Skip to main content
Question

How to create an conditional Merge For Template


Forum|alt.badge.img

I would like to create if-then logic for multiple rows of a table based on a value in the table itself. Example:

 

Name

Type

Date

Richard

A

4/7/2025

Chase

B

4/7/2024

Melissa

A

4/4/2025

 

The merge tag would essentially state that, "if the Type=A, then state, [Name] enrolled in services on [Date]", but "if the Type=B, then state, [Name] cancelled services on [Date]".

 

Is there a way to create one merge tag that evaluates all the rows in the table based on the "Type" column, then creates different outputs based on the "Type?" What type of "field type" should I use in the Form for the Configuration, too? I have it now as a "Custom Table," but I'm not sure if that's the right field type to use. 

2 replies

Vinicius.Rodrigues
Docusign Employee
Forum|alt.badge.img+14

Hi ​@COA.Team !


Sorry if I didn't understand your question correctly, but do you want to get some information that was provided in a form, and based on it, extract the information from a CSV?

For example, if the form was filled out as department X, then we will need to check the CSV database to find out who would be responsible for that department.

 

As far as I know, .CSV databases are only used to get content or assist in filling in information (such as attributes in loop), but I don't think it's possible to use a .CSV database to perform analyses or calculations within the table itself.

 


Forum|alt.badge.img+4
  • Conversation Starter
  • 13 replies
  • April 17, 2025

Hi ​@COA.Team  I believe you can use evaluate XPath step to query the rows of Custom Table with a particular type and then merge xml step to combine the xml in final document with regular TableRow or Repeat merge tags.