Differences

This shows you the differences between two versions of the page.

Link to this comparison view

action type - relationship exist [2016/09/14 14:19] (current)
Line 1: Line 1:
 +~~NOTOC~~
 +====== Does a relationship exist? ======
 +Use the [[Query Builder|query]] builder'​s below to find two sets of [[Record|records]] and then choose a relatonship table to look in for the existence of relationship records between all combinations of the records from the first query and those from the second query. This evaluation will pass if any relationship records are found and it will fail if no relationship records are found.
 +===== Explanation =====
 +Evaluations have two [[Automation Trigger|automation triggers]] associated with them : Then and Else.  Actions under the "​Then"​ automation trigger execute when the evaluation passes, and actions under the "​Else"​ automation execute when the evaluations fails.
  
 +{{ ::​action_evaluation_drop.png?​direct |}}
 +
 +Relationship record exists evaluations are used to execute a set of actions if relationship records exist between two sets of records, and another set of actions if they don't.
 +
 +Example : Suppose a [[Form Type - Field Grid|field grid form]] on a [[Form Type - Page|page]] about a Contact should be editable if the current Contact has a relationship record between it and an Account, in the relationship table Employer to Employee. ​ To accomplish this, the builder would edit the actions for the field grid form, and on the Security automation trigger add a relationship record exists action. ​ In the first query builder, leave the context inherited to query the current Contact, and in the second query builder jump from the current Contact to an Account over the Employer to Employee relationship table. ​ Then choose the Employer to Employee relationship table for which relationship table to look in.  Under the "​Then"​ automation trigger place the actions that should fire if the relationship record in question exists.
 +
 +Example : Suppose an application allows Contacts to be imported, and once they are imported if any Contacts live in the state of Pennsylvania,​ a set of actions should execute. ​ To accomplish this, the builder would first build the [[Action Type - Import Records|record import]] actions appropriately. ​ After the record import actions are complete, they would then add a record exists evaluation, and query the Contact ​ for all Contact records, filtering the state part of their [[Field Type - Address|Address field]] to be "​PA"​. ​ Under the "​Then"​ section they could add the actions for when there are Contacts in "​PA"​ and under the "​Else"​ section actions for when there are no Contacts in "​PA"​.
 +
 +===== Settings =====
 +==== Query records to evaluate for a relationship record between ====
 +Use the query builders to find two sets of records.
 +
 +{{ ::​action_relationexists_queries.png?​direct |}}
 +==== Choose the relationship table to look for relationship record in ====
 +Select the relationship table you wish to look in for a relationship record connecting records from one query to records from the other query, above.
 +
 +{{ ::​action_relationexists_table.png?​direct |}}
 +
 +==== Describe this action ====
 +Useful as a comment, this description will overwrite the automatically generated description in the [[Action Manager|Action Manager]].
 +==== Queue this action and children ====
 +When an action is [[Action Queue|queued]],​ the subsequent actions continue to process without it. Meanwhile, the queued action and its children process separately. Queue actions that you don't want a user to wait for.
action type - relationship exist.txt ยท Last modified: 2016/09/14 14:19 (external edit)
Copyright WorkXpress, 2019