cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

InvalidTemplate error message in "append to array variable" function. Using word connector to populate MS Word template from sharepoint list data.

I am currently trying to build a flow that populates a MS Word template (with some repeating sections in the template) with data from a SharePoint list. The items in the SharePoint list are a list of projects. I am using the "word business online word connector" to populate the template and the 'Get Items' function to retrieve data from the SharePoint list. The template has four sections that are to be repeated based on the number of SharePoint items value(column). In this case  the value that is being evaluated is the 'status' of a project. So depending on the status of the project, the flow is supposed to select the section that corresponds to that status and populate it with SharePoint data. This way when the word output file is generated there will be multiple populated sections of the template for each respective project status.
 
Project status 1 -Section1 of template (populate this section of the template for the number of items in the SharePoint list that are in Project status 1)
Project status 2 -Section2 of template (populate this section of the template with all items from the SharePoint list that are in Project status 2)
And so on until section4 and project status 4.
I am using the 'append to array variable' function to connect areas within each section of the template to specific columns in the SharePoint list. When I run the flow I get the below error message. I have tried resaving the flow and re-opening my browser as suggested in other posts but I am still receiving this same error message. Any ideas how I can resolve?
 
"InvalidTemplate. Unable to process template language expressions in action 'Append_to_array_variable_3' inputs at line '1' and column '31920': 'The template language expression 'body('Format_number')?['body']' cannot be evaluated because property 'body' cannot be selected. Property selection is not supported on values of type 'String'. Please see https://aka.ms/logicexpressions  for usage details.'"

3 REPLIES 3
Community Support
Community Support

Hi @kijja ,

 

Could you please share the full screenshot of the configuration of the flow and the run history of the flow so I could better understand and reproduce your issue to provide a proper workaround?

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Append to Array variableAppend to Array variableAppend to Array variable2Append to Array variable2run historyrun historyset variables for Null values in Sharepoint listset variables for Null values in Sharepoint listSwitch to appropriate screen.PNG

Hi Alice, 

 

Thank you for your response. I attached a number of screenshots. Please let me know if I missed anything that you would like to see . 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (3,783)