Applies To: SharePoint On Premises and SharePoint Online
In Workflow Manager conditions we frequently compare the list column values with some fixed value or expression. For example, if value of ‘Priority’ column is ‘High’ or if ‘Due Date’ is greater than ‘Today’ date value. In some scenarios, we need to compare the value of a list column with another column of the list item. For example, we want to check if item is created by same user who is currently the user to whom Ticket is assigned (compared ‘Created By’ column with ‘Assigned Staff’ column value). This may be required at the Workflow level or at the action level.
In such case we need to use the column placeholders for the value part in conditions as described below:
Column placeholder has this syntax: [Display name of column|Internal name of column]
You can directly put this syntax in condition or you can use below steps to get the place holder value:
In the above example screenshot, we are allowing the workflow execution only if “Created By” is not equal to “Assigned Staff”. We have selected the “Created By” in left drop down and for place holder to insert in right side text box, start configuring a dummy “Create Item” action and click on add field mappings to get the column placeholders. See sample screenshot below.
Select the desired column (Assigned Staff in our example) from the bottom list box, click “Add Placeholder to Value”, this inserts the place holder in “Column Value” text box. Copy the whole place holder text, cancel the dummy action, and paste the place holder in the desired condition setting in condition builder.
Different type of placeholders/values used in conditions:
|Literal/Custom Values||Column Value||Resolved|
|Place Holders||[Column Display Name|Column Internal Name]||[Request Status|RequestStatus]|
|Query List||QueryListActionName##[Column Display Name|Column Internal Name]||GetApprovalLevel##[Approval Level|ApprovalLevel]|
|Functions||Syntax will be based on function used in condition.||$add([Due Date|DueDate],[Created|Created])|
|Content Types||Content Type Name||Issue Type|