May 172013
 

In my previous post Exporting InfoPath repeating table data with Nintex Workflow I talked about how to pull repeating data from an InfoPath form for use in a Nintex workflow.  You’ll want to read it first to understand where these steps fit.  The client want the repeating data exported in the previous post to be displayed in table format in an approver email.  I added a few steps before, during and after the For Each loop to build the HTML statement used in the body of the email.

BEFORE THE LOOP

Add a Build string action to the workflow before the loop.

image

Add a variable called LineDetailTable of type Single line of text. Configure the action as follows:

image

DURING THE LOOP

Within the loop, after the XML has been queried, add a Build string action to add the HTML for each of the repeating lines from the InfoPath form.

image

Configure the action to append the line details to the LineDetailTable variable:

image

AFTER THE LOOP

After the loop has completed, and the data from all the repeating lines has been added to the string variable, finish off the table in another Build string action.

image

In this case I included the Line Items table within another table that contained header information about the form.  I controlled the font within both tables using styles.

image

DISPLAY LINE DETAILS TABLE IN AN EMAIL

I was able to display the HTML table in an email simply by inserting the workflow variable into the body of the email.

image

The table rendered in the email like this:

image

  6 Responses to “Creating an HTML table in a Nintex Workflow”

  1. HI Great post!!
    Ive been trying to get this to work not sure what I am missing, pretty sure I have missed something even though i have double checked everything!!
    So I end up with either of two senarios:
    Example 4 lines of data: If I configure my XML data extracts in the loop to save as single line of text, I end up with a table in my email with 4 rows of data, but same data from row one just repeats across the rest of the table.

    If I set my XML data extracts up to save as a collection I then end up with 4 rows of data in my table, but each cell displays the total data from that collection. ie

    Food

    Icecream;Pineapple;Donut;Pancake;
    Icecream;Pineapple;Donut;Pancake;
    Icecream;Pineapple;Donut;Pancake;
    Icecream;Pineapple;Donut;Pancake;

    Any help would be appreciated!!

  2. Hi Amy,

    I have this working with a rollup of weekly reports, but I’m having issues with the HTML data displaying inconsistently. I suspect it’s a Nintex/MS Outlook issue, since it works OK most of the time. Other times there is stray code thrown in (i.e.; ) or the columns occasionally don’t display on one line. etc.

    Have you had any issues, or have any suggestions?

    Thanks,
    Joseph

    • I had issues with this when I first started configuring the HTML for email. You really have to be careful configuring the HTML body, font and table(s). You also have to be careful not to add any spaces or carriage returns into the ‘build string’ configurations. It should be one long string with no spaces.

  3. Can you get this table to display on the workflow task or only on the notification email? When I try to put it in a rich text field all I get is the markup language not a table. How do you get HTML to show on the nintex forms?

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

Wordpress SEO Plugin by SEOPressor