Sunday, 7 July 2024

PowerAutomate Flow to populate a word document table with Dynamic Rows

Overview: I recently needed to generate a dynamic table within word using Power automate, there are lots of resources out there to do it.  I found the order I did the core steps in determines if the process works so thought I'd blog this as a reminder and simple guide.

Objective: Use a flow to build an dynamic array and display the output within a Word document.

Steps

1. Create a new Flow in Power Automate (here I am initialising an array but you can build this up as you need too.  The Select option and nested actions allow for creating most required data sets)


2. Create a Word document for the template (in my scenario, I've created the MS word document inside a SharePoint Document library, as shown below)

3. Edit the word Document to Display the dynamic Rows (you need to edit in the Word app not the browser version of word).  
  • Add/Insert a Table (mine needs three columns)

  • Ensure you have the "Developer" ribbon setup and give the focus to the position where the fist dynamic field is needed.

  • Insert the "Plain Text Content Control" within the table at the desire places
  • Add the "key" name from the array to each plain text control as shown below:


  • The word document should looks as shown below.  Save and close the docx file.



0 comments:

Post a Comment