To increase the flexibility of property value population, 4 default value options in the ‘Edit Property’ dialogue were introduced in the 2.16 release
In order to benefit from Best Practices related to property value population, you are strongly recommended to read this article in conjunction with the companion article on Evaluation Mode
Here is the documented behaviour of the default value options settings and you should choose the correct option based on the desired behaviour:
Conceptually "Default value" and "Fixed value" can be thought of as opposites: a Default Value will not populate a cell that already has a value, only if it is blank; a Fixed value will overwrite anything that is entered into a cell i.e. even if it blank or a new value entered
* This can be thought of as a property of a hidden node that is the ultimate root of the tree – the so-called ‘Mother of all Nodes’
† When using the Default / Inherited / Fixed settings the cells appear to contain a value but are blank when clicked on. Values set using ‘Initial’ are persisted into the cell itself.
- If you only need the expression to be calculated once (or rarely) and remain static most of the time , you can prevent re-evaluation, providing more control. Prevent your expressions being re-calculated when you do not want them to by adding a !! to the end
- You can use splash commands with expressions in the default value field : -
!! means result of the expression
!!* means result of the expression applied to all nodes (more typically used in the cell rather than 'edit property')
- When there is a property using an expression dependent on another cell (basic example: copy of another cell's value), particularly a value unlikely to change, the Best Practice in this case is to set the property to Fixed Value and evaluation mode to On Demand as it runs OrgVue's internal fetch cycles most efficiently: subsequent updates can then be run with the Formula button, which is enabled when these two modes are used in conjunction. The button appears at the top of the column in the Worksheet view.
- For other modes other than the previous, the easiest way to force property reevaluation is to run a blank splash command !!* in the relevant cell, which sets cells to blank and therefore the default options setting is reevaluated. For obvious reasons, beware of running this in conjunction with Default Value
For properties which are set as 'populators' (ie they contain an expression which is typically run on demand), the choice of 'Property value population is as follows : -
- Fixed value - This will populate the result of the calculation regardless of the contents of the cell
- Default value - This will populate the result of the calculation unless a different value is hard coded in the cell
- Initial value - This will populate the result of the calculation to all nodes when the property is created (and all new nodes) but can be overridden or deleted
- Inherited value - will populate the result of the calculation unless a hard coded value is available to be inherited from an ancestor; i.e. it will not inherit the result of the calculation from an ancestor
It is only this last case where the behaviour is slightly different to that for a non-populator property.
This article was authored by Ben Marshall from the OrgVue Consulting Team