Add an If/Then/Else statement

Available on Smokeball Grow and Prosper+

Use If/Then/Else statements to automate fields or asks in a document. They're an advanced type of automation but with some training and practice, you can use this feature to create powerful templates. 

What is an If/Then/Else statement?

An If/Then/Else statement solves for situations where certain conditions lead to a certain outcome. For example:

  • If Condition A is true, then show X.
  • If Condition A is false, then show Y.

Smokeball's Precedent Creation/Modification mode helps you build If/Then/Else statements in precedent templates. Below, you'll find some examples of If/Then/Else statements and how to insert them into your documents. Use the Table of Contents on the right-hand side of this article to navigate quickly!

Video guide

Prefer to watch a video? Watch our video guide below:

Add an If / Then / Else statement to a document

  1. Open a matter, then select Precedent from the Matter tab. Then, select Add a precedent and create a new precedent. The left panel is referred to as the Precedent Creation/Modification mode.
  2. Ensure your 'Show' button is set to 'Show Fields'
    2018-12-13_15h39_04 (2).png
  3. Click on the If / Then / Else tab 
  4. Select whether the If / Then / Else is dependent on an Automation Field or Ask from the If: drop-down
    2018-12-20_11h23_16.png

Create an If / Then / Else Dependent on Field Existing

For example: I want to create a variable in my document where if a finance approval due date exists on my Matter I want a paragraph to show, and if there is no finance approval due date on my Matter, I want no information to show

  1. In this example, expand Conveyancing Details and select the Finance Approval Due Date Automation Field
  2. From the Is: drop-down select 'Exists'
    image(129).png
  3. Place the cursor at the end of the directly preceding paragraph
    image(130).png
  4. Click Insert
    image(136).png
  5. Highlight the paragraph that you want to appear if there is a finance approval due date and cut this information
    image(132).png
  6. Delete the word true
    image(133).png
  7. Paste the paragraph about the finance approval due date where the word true was (in between if then and else)
    image(134).png
  8. Delete the word false (in between else and end if), as there is no information to show if there is no finance approval due date
    image(135).png
  9. 'End If' indicates the end of the variable and should be included after the information you want to show if there is no finance approval due date

Create an If / Then / Else Dependent on Field Equalling

For example: I want to create a variable in my document where if 'Nature of Property' equals 'Residential Vacant Land' I want a paragraph to show about vacant land and if the 'Nature of Property' is equal to anything else, I want a paragraph about final inspections to show

  1. In this example, expand Property Details and select the Nature of Property Automation Field
  2. From the Is: drop-down select 'Equal'
  3. In the Equal box, type 'Residential Vacant Land' exactly as it is worded and formatted in the Property Details window of the matter
    image(137).png
  4. Place the cursor at the end of the directly preceding paragraph
    image(144).png
  5. Click Insert
    image(139).png
  6. Highlight the paragraph that you want to appear if the property is Residential Vacant Land and cut this information
    image(145).png
  7. Delete the word true
    image(146).png
  8. Paste the paragraph about Residential Vacant Land where the word true was (in between if then and else)
    image(147).png
  9. Highlight the paragraph that you want to appear if the property is anything other than Residential Vacant Land and cut this information
    image(148).png
  10. Delete the word false
    image(149).png
  11. Paste the paragraph about anything other than Residential Vacant Land where the word false was (in between else and end if)
    image(150).png
  12. 'End if' indicates the end of the variable and should be included after the information you want to show if it is not Residential Vacant Land

If / Then / Else Dependent on Greater Than Or Equal

For example: I want to create a variable in my document if the Purchase Price is equal to or greater than $750,000.00 I want a paragraph to show about Capital Gains Withholding, and if the Purchase Price is less than $750,000.00 I want no information to show

  1. In this example, expand Conveyancing Details and select the Purchase Price Automation Field
  2. From the Is: drop-down select 'Greater Than Or Equal'
  3. In the Greater Than or Equal box type '750,000.00' exactly as it is worded and formatted in the Conveyancing Details window of the matter
    image(151).png
  4. Place the cursor at the end of the directly preceding paragraph
    image(152).png
  5. Click Insert
    image(153).png
  6. Highlight the paragraph that you want to appear if the property is equal to or greater than $750,000.00 and cut this information 
  7. Delete the word true

  8. Paste the paragraph about Capital Gains Withholding where the word true was (in between if then and else)
  9. Delete the word false, as there is no information to show if the purchase price is less than $750,000.00
  10. 'End If' indicates the end of the variable and should be included after the information you want to show if the purchase price is equal to or greater than $750,000.00

Create an If / Then / Else Dependent on Ask

For example, I want to create a variable in my document dependent on a custom field or Ask, such as if there is an Easement on the property I want a paragraph to show about Easements and if there is no Easement on the property I want no information to show

  1. In this example, you will first need to create an Ask
  2. From the If: drop-down select 'Ask'
  3. Select the relevant Ask
  4. From the Is: drop-down select 'Equal'
  5. In the Equal box, type 'Yes' exactly as it is worded and formatted in the Ask
  6. Place the cursor at the end of the directly preceding paragraph
  7. Click Insert

  8. Highlight the paragraph that you want to appear if there is an Easement on the property and cut this information
  9. Delete the word true

  10. Paste the paragraph about Easements where the word true was (in between if then and else)
  11. Delete the world false, as there is no information to show if there is no Easement on the property
  12. 'End if' indicates the end of the variable and should be included after the information you want to show if there is no Easement on the property.

Identifying errors in If/Then/Else statements

If/Then/Else statements can become complicated, especially when there are several in a single document. If you are running into errors when generating If/Then/Else statements, refer to our troubleshooting guide.

 

Was this article helpful?
2 out of 3 found this helpful

Articles in this section