Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

With our expanded trust statement functionality introduced in the trust accounting v3 rollout Actionstep has introduced new conditional merge field capabilities. This feature will be expanded to include even more conditional options in the future but for now we'll go over the updated merge field capabilities included in the most recent release.  If you wish to hide/show sections of your document based on certain conditions then you can surround that text with consitional merge fields (IF, ELSEIF, ELSE)

Syntax

In order to create a conditional statement in your document template you will need to create a merge field using the following format:

Code Block
[[*IF {FirstName|pt=Client|rn=*} = "Steve" *]] Hello Steve [[*ENDIF*]] 

 

The * denotes that we're doing something special while the IF starts the conditional statement

[[*IF

The standard merge fields from your merge field list should be included in braces (otherwise known as "curly brackets")

{FirstName|pt=Client|rn=*}

Any static values should be included in quotes and there should be an operator in front of that static value

...

The text that you wish to display should follow the conditional start field 
Hello Steve 

 

Finally, you will need to include a conditional field stop

 [[*ENDIF*]] 

 

 You can add any number of ELSEIF options for additional conditions and and ELSE section as a catch-all if all prior IF/ELSEIF conditional are false

Example

Code Block
The Client's Nickname is: [[*IF {FirstName|pt=Client} == "James" *]] Jim [[*ELSEIF {FirstName|pt=Client} == "Robert" *]] Bob [[*ELSE*]] [[FirstName|pt=Client]] [[*ENDIF*]]