Happy Business Starts Here

Nested IF's

Highlighted
Zuora Support

Nested IF's

I am trying to set up Nested IF's in my invoice template.  Are there any rules that I should be aware of and follow?



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Zuora Support

Re: Nested IF's

When using nested IF, in each condition you can either display a merge field or use another IF, and they cannot be combined.

 

Here is the correct syntax.

 

IF (condition)
True - display a merge field
False - use an IF ()

 

Here is an incorrect one.

 

IF (condition)
True - display a merge field
False - display 'some texts' + use an IF () // This is invalid as texts and IF cannot be used together.

 

A sample nested IF

 

{ IF «InvoiceItem.ExtendedPrice» < 0 "«InvoiceItem.ExtendedPrice» CREDIT" "{ IF «InvoiceItem.ExtendedPrice» = 0 "FREE" "«InvoiceItem.ExtendedPrice»" }" }

 



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

View solution in original post

1 REPLY 1
Highlighted
Zuora Support

Re: Nested IF's

When using nested IF, in each condition you can either display a merge field or use another IF, and they cannot be combined.

 

Here is the correct syntax.

 

IF (condition)
True - display a merge field
False - use an IF ()

 

Here is an incorrect one.

 

IF (condition)
True - display a merge field
False - display 'some texts' + use an IF () // This is invalid as texts and IF cannot be used together.

 

A sample nested IF

 

{ IF «InvoiceItem.ExtendedPrice» < 0 "«InvoiceItem.ExtendedPrice» CREDIT" "{ IF «InvoiceItem.ExtendedPrice» = 0 "FREE" "«InvoiceItem.ExtendedPrice»" }" }

 



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

View solution in original post