Skip to main content

Struggling to find examples of how use data from salesforce as the "conditional Content here" which is taken from the XML examples

Only display content if a check box field is marked True:

<# <Conditional Test="//Opportunity/HasOverdueTask[text() = 'True']" /> #>CONDITIONAL CONTENT HERE<# <EndConditional /> #>

I can get the conditional test to work and display eg, output would display CONDITIONAL CONTENT HERE if using the above code.

I would like the conditional content to be data from a field within salesforce.

i have tried the following but all output the same error: TemplateErrorExists:Conditional and matching EndConditional tags must be in the same paragraph as conditional content OR in their own paragraphs above and below conditional content.

<# <Conditional Test="//Opportunity/Alternative_EULA__c [text() = 'True']" />

#>/Opportunity/Account.Alternative_EULA__c <# <EndConditional /> #>

<# <Conditional Test="//Opportunity/Alternative_EULA__c [text() = 'True']" />

#>"/Opportunity/Account.Alternative_EULA__c"<# <EndConditional /> #>

 

<# <Conditional Test="//Opportunity/Alternative_EULA__c text() = 'True']" />

#><Content Select="/Opportunity/Account.Alternative_EULA__c"/> <# <EndConditional /> #>

 

<# <Conditional Test="//Opportunity/Alternative_EULA__c ctext() = 'True']" />

#><# <Content Select="/Opportunity/Account.Alternative_EULA__c"/> #> <# <EndConditional /> #>

Any help or direction to resources that give example of similar logic in action would be welcomed. I am trying to maintain a single template, rather than having the conditional logic to choose between 2 templates.

I solved this using by putting the code into separate rows.

<# <Conditional Test="//Opportunity/Alternative_EULA__c [text() = 'True']" /> #>

 

<# <Content Select="/Opportunity/Account.Alternative_EULA__c"/> #>

 

<# <EndConditional /> #>

So, the specific request solved BUT would still welcome links to resources that goes into depth on how to use logic on templates?


Hello,

Thank you for reaching out here in the DocuSign Community.

Glad to hear you were able to solve your initial issue, the following article has more information on conditional logic within DocuSign Gen using a Word-based document: https://support.docusign.com/s/document-item?language=en_US&bundleId=izj1586134369853&topicId=bxh1619201282189.html&_LANG=enus

Let us know if you need further assistance with this.

Best regards,

Nathaly | DocuSign Community Moderator

"Select as Best" below if you find the answer a valid solution to your issue!


Reply