How to make calculated field editable

Hello,

How can we make calculated field editable.

Parents
  • In order to make calculate fields editable you need to implement a Dependency SetValue instead of a sugarLogic formula via Studio.

    In the trigger of dependency you need to evaluate whether it is empty or not, the way it will be calculated only if empty:

    $dependencies['Quotes']['data_venda'] = array(
    	'hooks' => array("view", "edit"),
    	'trigger' => 'equal($data_venda_c,"")',
    	'triggerFields' => array(),
    	'onload' => true,
    	'actions' => array(
    		array(
    			'name' => 'SetValue',
    			'params' => array(
    				'target' => 'data_venda_c',
    				'value' => 'now()'
    			),
    		),
    	),
    );

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
Reply
  • In order to make calculate fields editable you need to implement a Dependency SetValue instead of a sugarLogic formula via Studio.

    In the trigger of dependency you need to evaluate whether it is empty or not, the way it will be calculated only if empty:

    $dependencies['Quotes']['data_venda'] = array(
    	'hooks' => array("view", "edit"),
    	'trigger' => 'equal($data_venda_c,"")',
    	'triggerFields' => array(),
    	'onload' => true,
    	'actions' => array(
    		array(
    			'name' => 'SetValue',
    			'params' => array(
    				'target' => 'data_venda_c',
    				'value' => 'now()'
    			),
    		),
    	),
    );

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
Children
No Data