Skip to main content

IF Statements in Baseline Documents (Beta)

How to use IF statements to conditionally include items in your generated documents

Updated over 6 months ago

Expert Feature Only – Currently in Beta

The IF statement feature in Baseline allows you to display or hide content dynamically based on conditions in a loan file. This is a powerful tool for advanced users building templates, logic-driven documents, and smart outputs.

This feature is currently in beta. If you need help implementing logic for your documents, our team is available to assist — just reach out with your use case.


What Are IF Statements?

IF statements allow you to write conditional logic directly in your document templates. These are typically used to tailor content based on loan values, property characteristics, borrower details, or custom input fields.


Syntax

«IF condition» ...your content here... «END-IF»

Supported Operators

Operator

Meaning

==

Equals

!=

Not equal

>

Greater than

<

Less than

&&

Logical AND

!

Logical NOT


Custom Fields

You may use any standard field in the loan file or define your own custom fields.

The output of custom fields (and most fields) is treated as text, so you will not be able to use numberic comparisons, i.e. <, >

  • For text fields, you must wrap the value in quotes:
    «IF My_Field == "Yes"»


IF Statement Examples

Condition/Field

Example Statement

Multiple collaterals on loan

«IF loan.addresses.length > 1»

Use of Funds is Purchase

«IF loan.use_of_funds == "Purchase"»

Use of Funds is Cashout

«IF Use_of_Funds == "Cashout"»

Use of Funds is not a Refinance

«IF loan.use_of_funds != "Refinance"»

Property Type = Condo

«IF Address_Property_Type == "Condo"»

Property Type = Mixed-Use

«IF Address_Property_Type == "Mixed-Use"»

Loan Amount > threshold

«IF loan.amount > 3000000»

Loan Amount < threshold

«IF loan.amount < 1000000»

Field not populated

«IF !Broker_Processor_Name»

Holdback = $0 or blank

«IF (Holdback == "$0.00")»

Holdback > $0

«IF (Holdback != "$0.00" && Holdback != "[INSERT HERE]")


Tips

  • Always use straight quotes " for string comparisons. Avoid curly quotes or special characters.

  • Every «IF ...» must have a matching «END-IF».

  • Nested IF statements (one inside another) are not supported, but you can combine multiple conditions using && and ||.

  • You can dynamically calculate values using math tags, i.e.

    «=math("Loan_Amount * 1.25", "currency")»

Need Help?

IF statements offer powerful customization but require precise syntax. If you need help with logic, custom conditions, or troubleshooting, reach out to our team — we’ll help configure or review your statements directly.

Did this answer your question?