Skip to main content
Participant
June 20, 2023
Answered

Adobe Document Generation - Conditional Section - Are two conditions possible?

  • June 20, 2023
  • 1 reply
  • 904 views

Hi! Using the Document Generation tool, you can put a conditional section within a word document, such as the following: 

{% conditional-section expr(x = 1) %}Conditional Text Here{% end-section %}

 

I am wondering if it's possible to have a conditional section that is contigent upon TWO conditions, something along the following lines: 

{% conditional-section expr(x = 1 AND y=2) %}Conditional Text Here{% end-section %}

And, if it is possible, how it would be formatted?

Thank you!!

This topic has been closed for replies.
Correct answer Dheeraj5FAC

Yes it is possible to have a conditional section based on 2 conditions. You would be required to use it as below.
{% conditional-section expr(x = 1 and y=2) %}Conditional Text Here{% end-section %}.

Since document generation supports jsonata compliant expressions, you can read more about them here - https://docs.jsonata.org/overview 

1 reply

Dheeraj5FACCorrect answer
Adobe Employee
June 21, 2023

Yes it is possible to have a conditional section based on 2 conditions. You would be required to use it as below.
{% conditional-section expr(x = 1 and y=2) %}Conditional Text Here{% end-section %}.

Since document generation supports jsonata compliant expressions, you can read more about them here - https://docs.jsonata.org/overview