I'm trying to work out how to populate a table in my HTML template.
I've added some code based on the sample template which works when I input static values in flow but how do I pass a collection from Powerapps?
I was hoping it was just a case of adding an "Ask in PowerApps" to the template data but that gives an error that it expects a record. I thought about initialising a variable in flow but presumably that would just pass a single value from the collection (table).
It seems like it's possible reading the documentation but I'm stuck. Here's the flow.
I’ve tried it myself and it works fine, I’ve used a simple JSON in “Ask in PowerApps” though.
Could you please send me the object that you are trying to pass to “Ask in PowerApps”?
If it contains some sensitive information you can send it to me via PM.
I have some basic text inputs in a PowerApps app along with a collection called ‘PPECollect’, very basic, just 2 columns, ‘Item’ (text) and ‘Qty’ (number value).
I have a submit button in the app which runs a flow that gets the source template and creates the HTML file as per the documentation. This is working fine for the text inputs, the placeholders are replaced no problem.
My question is, how do I go about getting the rows from the collection into the template?
The source HTML has a table with the following code (which may or may not be correct):
I can populate that table using static values in the flow but I obviously only get one row.
How do I actually get it to work for each item in the collection?
Do I need to initialise variables first, like I’ve had to do for the text fields? Or maybe use the Create HTML Table action?
I’m obviously missing something basic as I can’t find much information on this aside from the HTML syntax.
Sure, that makes sense, but what about values in a collection?
Let’s say that “FirstName” & “LastName” came from a list in PowerApps, or a SharePoint list, or any other table, how would you format the Template Data section?
Having a variable for each instance of “FirstName” and “LastName” would require me to know how many rows are in the table before it is run, any number of names/items could be in the list and I need the action to pass each row into the final HTML to create the table.