cancel
Showing results for 
Search instead for 
Did you mean: 

Drawloop - If Statement - Collapsible

Topic

How to format If Statements to be collapsible. This Word format will leave no blank lines/spaces when some If statements evaluate as "False".
The logic of the If statement can be altered per the use-case.


 

Instructions

Standard Single Microsoft IF statement: {IF "<<FieldTag>>"="X" “TRUE” “FALSE”} 

IF "SalesforceFieldValue" Equals "Criteria" Then "True Statement" Otherwise "False Statement"
 

Note: For this example, the False statement is containing the data we want to populate.

1. Write out the IF Statements on their own lines.

Example:
{IF"<<Tag1>>"="" "" "<<Tag1>>"}
{IF"<<Tag2>>"="" "" "<<Tag2>>"}
{IF"<<Tag3>>"="" "" "<<Tag3>>"}
{IF"<<Tag4>>"="" "" "<<Tag4>>"}
{IF"<<Tag5>>"="" "" "<<Tag5>>"}
{IF"<<Tag6>>"="" "" "<<Tag6>>"}

2. Line 1 will contain 2 If statements back to back. Move the second up to be back to back with IF statement 1.

{IF"<<Tag1>>"="" "" "<<Tag1>>"}{IF"<<Tag2>>"="" "" "<<Tag2>>"}
{IF"<<Tag3>>"="" "" "<<Tag3>>"}
{IF"<<Tag4>>"="" "" "<<Tag4>>"}
{IF"<<Tag5>>"="" "" "<<Tag5>>"}
{IF"<<Tag6>>"="" "" "<<Tag6>>"}

3. Then add a (Hard Return) [Shift + Enter] inside the first quote of the False statement

{IF"<<Tag1>>"="" "" "<<Tag1>>"}{IF"<<Tag2>>"="" "" "(Hard Return)
<<Tag2>>"}
{IF"<<Tag3>>"="" "" "<<Tag3>>"}
{IF"<<Tag4>>"="" "" "<<Tag4>>"}
{IF"<<Tag5>>"="" "" "<<Tag5>>"}
{IF"<<Tag6>>"="" "" "<<Tag6>>"}

4. Continue to move the rest of the Word If Statements to be back to back and adding the (Hard Return).

{IF"<<Tag1>>"="" "" "<<Tag1>>"}{IF"<<Tag2>>"="" "" "(Hard Return)
<<Tag2>>"}{IF"<<Tag3>>"="" "" "(Hard Return)
<<Tag3>>"}{IF"<<Tag4>>"="" "" "(Hard Return)
<<Tag4>>"}{IF"<<Tag5>>"="" "" "(Hard Return)
<<Tag5>>"}{IF"<<Tag6>>"="" "" "(Hard Return)
<<Tag6>>"}


5. Expected behavior: The If Statements will collapse on each other when blank leaving no white spaces.


Labels: (2)
Version history
Revision #:
10 of 14
Last update:
3 weeks ago
Updated by: