DocGen Conditional Hide/Show of Table Rows using Google Docs Template

  • 1 June 2019
  • 3 replies
  • 200 views

I am using Nintex DocGen (formerly Drawloop) inside Salesforce.com to generate documents based on mailmerging info from various fields and related object's fields. I have a fairly complex set of relationships setup so I can get to all the fields I need. For this purpose I am using the Child of a Child to my Object.

 

My question is how can I make a Row on that second level Child either show or not show based on if there is data in it? I have looked at the MS Word Conditional Text section that uses Quick Parts function (https://help.nintex.com/en-us/docgen/docservices/Default.htm#docgen-sfdc/Services/templates/ConditionalTextWord.htm%3FTocPath%3DWork%2520with%2520the%2520basics%7CSetup%2520templates%7CMicrosoft%2520Word%7C_____1) but when I type in the that same output text to Google Docs, and then runt he DocGen, nothing seems to happen. Is MS Word putting some special unseen characters that DocGen is processing?

 

My IF statement looks like this: 

{ IF "<<Option_Title1>>" <> "" "1" "" * MERGEFORMAT }

 

In the above instance I am just trying to hide or show the number "1". However my real goal is to hide or show an entire line.

 

One more wrinkle. Option object has several fields that I all want to show on separate lines IF they exist or not show the row at all if they do not exist.

ie:

          Qty    Option Name     Price

row1:  1   My Option1 Title1   $10

row2:  1   My Option1 Title2   $11

row3: {do not show bc this option does not exist}

row4  2   My Option1 Title4   $9

row5  1    My Option2 Title 1  $12

row6 {do not show bc this option does not exist}

 

Key is these are all on one Record of that Object - just different fields on the SAME record. Then sometimes there will be multiple Records that each all have the above fields.


3 replies

Badge +7

@jtonsrud Unfortunately the conditional text will only work with MS Word.  You might be able to accomplish the same thing with filtering data on the relationship.


 


https://help.nintex.com/en-us/docgen/docservices/docgen-sfdc/Services/manageDDP/FilteredRelationship.htm


 


and Delete Table (if no records)


 


https://help.nintex.com/en-us/docgen/docservices/docgen-sfdc/Services/manageDDP/t_relationships.htm


 

@DocGenVinnie  Thanks for the suggestion, but I need anywhere from 1-4 items from the same object to appear on different rows. It appears that you can only make a Child relationship between 2 objects once and not have 4 versions of the Child relationship (all with different filters). I get an error when trying to create the 2nd Child relationship between the same 2 objects.


 


I like your idea about changing it to delete the whole Table instead of Row - however, that did not seem to work either (with the single Child relationship.


 


Open to any other creative suggestions.

Has anyone else experienced this issue? Needing to hide a FULL ROW if there is no data in one field (not delete the entire Table)?

Reply