I'm just working on a Flow that is triggered from a PowerApp. It's intended to created a new list item in SharePoint first, then raise an approval and finally write the approval decision to the list item. Now I got stuck in evaluating the item ID of the SharePoint item created (Create item action with dynamic URL + list name). I was expecting it's available as input variable for the following actions but it is not. I mean, doing a Get item query afterwards seems to be a bad option (expensive, error-prone).
Maybe someone has already solved a similiar requirement and can help me?
Thank you so much in advance 👍
Solved! Go to Solution.
Its all depends on how your design is? If you thinking to capture the url and id from Power App itself after the creation you have couple of options.
1. Create a flow When a http is received. Pass all the SharePoint list creation column values into the body. Next step create SharePoint item. Finally you can return the id of the newly created list item.
2. If you don't want to use Step 1 method then use a query under the SharePoint list which you created using some unique column values (Assume you have some unique values) and return the Id.
Hi @abm, thanks a lot for your input 👍
capturing the ID from PowerApp is not needed but in the Flow itself since the approval results shall be written back to the item just created.
And yes, I also thought of the options you proposed. Especially the option to split Flow logic into two different Flows would be my favorite work-around: one Flow to create the SP item and another that has a When item created trigger and handles the approval.
But there are some drawbacks: increased complexity and even the need to purchase different Per Flow Plans instead of a single one (high transaction count) esp. since this pattern will be used more than once for our solution.
Therefore I'd like to know if there is a possibility to just get the ID of Create item action before implementing the work-around solution...
I may not be understanding you correctly, but the ID is available from Dynamic properties immediately after a create item action.
Hi @ScottShearer, thanks for your reply 🙂
You are right, the ID will be available when you are working with a known list at design time. In my case, the Flow has to deal with multiple list so the URL and list name are read from variables/parameters. And there I failed to get the ID since the Create item action does not come up in the dynamic props panel:
Lookup >> no ID found:
Check out the News & Announcements to learn more.
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.