Existence Tag Expression
Context: HL Kit … Kit Reference … Tag Expression Types
The role of the Existence tag expression is very similar to the Secondary tag expression. It is always used in conjunction with a portal that adds a pick to a container, such as a dynamic table or chooser. Instead of being processed as part of the portal, the tag expression is attached to the pick. When the pick is selected and added to the container, the Existence tag expression is also added to the new pick. At that point, the tag expression becomes part of the pick for the rest of the pick's existence.
Once added to the pick, the Existence tag expression governs whether the pick continues to exist within its container (hence the name). The Existence tag expression must be satisfied in order for the pick to continue its existence and avoid being automatically deleted. If the tag expression stops being satisfied, the pick is immediately deleted from the container, just as if the user had deleted it. This is a much more severe action than the Secondary tag expression, which simply causes the pick to go non-live. However, it is sometimes the better choice.
The Existence tag expression is always applied against the container to which the pick was added. The tag expression is compared against all of the tags possessed by the container, which includes the effects of all dynamically assigned and deleted tags. The Existence tag expression is invoked every evaluation cycle at the timing specified. This means that the pick can fail the tag expression at any time, depending on changes that occur with the container. Once that occurs, the pick is automatically deleted in its entirety.
It's also valid to omit the timing for an Existence tag expression and use default timing. The default timing is Setup/5000. However, you can setup whatever you want as the default timing for the Existence tag expression within the definition file.