Re: Need help to set variable as integer type and want increment it by 1 for each row in my HTML table response
Hi @IAK
using select action won't help you as it would be appending same values again and again.
Another approach to do this would be like below
step1: initialize two variables, one array variables which stores final array which needs to be converted to table and SrNo which stores the index which needs to be added on column SrNo.
Step2: Use Get items to get items from sharepoint
Step 3: Use Apply to each to loop through each items of get items action
Steps to be done in loop are described below
Step 3.1: use compose action which helps to add srNo property to the element currently on which iteration is done like below
Expression: addProperty(items('Apply_to_each'),'Sr No',variables('SrNo'))
3.2: Add the output of compose action to FinalTable array using append to array action
3.3. As shown above, use increment variable to increase the value of SrNo variable.
Outside of loop , use create html table action to convert FinalTable array to html table format like below
Hope this helps !