add conditional table row (in place)

  • 25 February 2020
  • 5 replies
  • 96 views

I'm trying to figure out the most efficient way to conditionally add two rows of data in the middle of a table. 

 

Lets say I can have up to 4 rows of data and always have at least 2 rows. The 2 conditional rows need to be added in the 2nd and 3rd position when present or just 2nd position if 1/2 is present. All data would be on the same object and could potentially be on a middleware excel file. 

 

I know I could use multiple templates and maybe even multiple tables in my excel file.

 

If you all have any ideas lmk in the meanwhile i'll be tinkering. 

 

Thanks


5 replies

Userlevel 5
Badge +13

Hi @Doc503,


 


You could have 2 tables in your DocGen package and use conditional text(https://help.nintex.com/en-US/docgensf/Templates/ConditionalTextInWord.htm) to show/hide the correct table. You can copy paste an entire table inside the condition.

Right but that solution would require 4 tables in the scenario I listed above.


 


Table 1 - 1,4


Table 2 - 1,2,4


Table 3 - 1,3,4


Table 4 - 1,2,3,4


 


Wouldn't every conditional combination need to have it's own table?


 


For a use case with up to 10 variable rows of data where the ends are static, this solution seems a bit bulky. 

Userlevel 5
Badge +13

Hi @Doc503,


 


It is a little bit bulky but it would allow you to just use Word and is the easiest to implement, other than the multiple template option you mentioned. You could use excel as middleware, I am just not sure what logic you would use to create the dynamic table missing middle rows without knowing what the data looks like.

It would be nice if there was an option to put a table into a component. 


 


I'm sure I could determine which table to use in excel, can I put the table name in the word merge field or do I need to actually paste the entire table into the merge field?

Userlevel 5
Badge +13

@Doc503 Copy paste the entire table in the merge field.

Reply