Nov 16 2022 01:55 AM
I have an Excel table with fields for Year1, Year2, Year3, Year4, Year5
I want to create a Sharepoint item in Power Automate for each.
I have created an array ( [1,2,3,4,5])
I have an apply to each item based on my array - Items(‘Apply_to_each_financial_year’)
I have a create item from my spreadsheet - outputs('Get_a_row')?['body/Year1']
I would like the correct syntax so that the create item refers to the year number in the array, not just year 1
outputs('Get_a_row')?['body/YearItems(‘Apply_to_each_financial_year’) ']
I presume this is a concatenate of some sort, but I can't get the syntax
If I can get this syntax to work it would loop round and create an entry for all 5 years without needing to write 5 create item actions in the flow.
Many thanks in advance
Nov 16 2022 02:31 AM - edited Nov 16 2022 05:51 AM
@Geoffers Try using this expression if it works:
@{concat('outputs(''Get_a_row'')?[''body/Year', item(), ''']')}
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Nov 16 2022 04:04 AM
Nov 16 2022 05:06 AM
SolutionNov 16 2022 05:53 AM
@Geoffers Great, glad you found the correct solution. Happy that you were able to figure out the correct expression based on my hint about using concat function.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.