Sample Rule 9
Description
Two rules that work together to create a date stamp for when an item is created and any time it is modified. These rules should be placed in two different folders such as Create Date and Modify Date both of which should be date folders.
Rule
Rule 1 (place in Create Date)
++:T+::
Rule 2 (Place in Modify Date)
++:T!::
Explanation
Rule 1
++:
Required for all autoassign rules
:T+:
The Flag where T means that it will only take effect if the item input is a top level item, child items will not be dated.
The + means that it will only be executed the first time that the the item has information input. If there is a change to the item then it will not execute, only when it is first created.
::
There is no value so if the rule executes it will insert the current date into the folder, the folder to which this rule is assigned.
:
There is no conditions which implies that the condition is always true and hence only the flag controls the assignment of value to the folder.
Rule 2
++:
Required for all autoassign rules
:T!:
The Flag where T means that it will only take effect if the itme input is a top level item, child items will not be dated.
The ! means that the rule will be executed any time that the the item changes. It will by default enter a value into the folder on the first execution of the rule, the same as Rule 1 above. The difference is in the flag ! and +.
::
There is no value so if the rule executes it will insert the current date into the folder, the folder to which this rule is assigned.
:
There is no conditions which implies that the condition is always true and hence only the flag controls the assignment of value to the folder.
Note
- If the entry is a TLI and then demoted, as would be the case of using enter to create the item and then later using the tab key to change the level, Rule 1 will execute on the initial entry and the data will stick.
- If on the other hand the item is entered as a child item then RUL ! will not execute. Subsequently changing the item to the TLI by using the shift and tab keys will cause Rule 1 and Rule 2 to execute.
- If an item is a TLI and both Rule 1 and Rule 2 had been executed, demoting and promoting the item will first delete the value from teh folder for Rule 2 and then when Promoted to the TLI the value will be set to the curent date.