There are many situations where it is helpful to have a post occur only if a certain condition is met. One way to do this is by creating a ‘Conditional’ post.
|A Common Mistake||
A common mistake is to assume that the post will only occur if the result of the source link matches a value in the target link. In fact, the post occurs regardless, as long as the the result of the source link is defined. The posting trigger mechanism is focused on whether or not the source link is defined, not on its value. For example, in an Option 2 post, when the source link is defined but does not match the target link, the post creates a new record.
|The Key to Conditional Posting||
The key to a conditional post is the icon in the second hole of the post tile (this hole is also referred to as the ‘Source Link’): If that icon evaluates to an undefined state, the post will not be triggered. Any defined state will allow the post to trigger.
Using an abacus is an easy way to control the defined/undefined state of the source link, as in:
If the condition in the If hole of the abacus is true, the abacus returns the value in the Then hole (the Record# field in this example). If the condition is false, the contents of the Else hole are returned.
In this example, the abacus returns defined only when the Flag field is true. (Remember that if the Flag field itself is undefined, the result will also be undefined.) So, only in the case of the Flag field being true will the abacus return a value, allowing the post link to complete, triggering the post.
To use the post, specify this abacus in the middle column of the Set Destination dialogue:
With this setup, the post will trigger if and only if the source link abacus is defined.