cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerSäm
Advocate III
Advocate III

Find out the ID for the FLow even though the sharepoint item has just been created!

Hello Everyone,

 

I hope I manage to explain my request well right away....

 

The following problem:

 

I am currently building an app in PowerApps that allows users to write leave requests and save them to sharepoint using the patch function. But now in the same button for patching the data I have also added the workflow.


Now I want that as soon as the manager approves the request, the item updates and the column with the "Status" tab changes from "Requested" to "Approved". The problem is, I can't store an ID for the row in the flow, because the item is created at the same moment in Sharepoint.

 

My question now: How can I retrieve the item just created or find out the ID? Do I have to define a variable somewhere in the flow at the beginning that says: take the ID of the just created request?

 

Picture 1 and 2 show the content of the button in Powerapps

PowerSm_0-1628148804959.pngPowerSm_1-1628148830062.png

 

Picture 3 shows the Flow:

PowerSm_2-1628148975827.png

 

 

Unfortunately, I'm at a loss right now and I'm really starting to despair. I am very grateful for any help or tips.

 

Thanks in advance,

PowerSäm

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @PowerSäm ,

 

Could you tell me:

Do you want to create an item of sharepoint list in canvas and get the item's ID?

 

You could pass the parameter form canvas to flow. So you need to get ID from canvas.

For example:

Set(VarID,patch(....).ID)

vxiaochenmsft_0-1628154517695.png

vxiaochenmsft_1-1628154525951.png

vxiaochenmsft_2-1628154534963.png

After click on the button:

vxiaochenmsft_3-1628154557925.png

vxiaochenmsft_4-1628154566464.png

 

Now you could use yourflow.Run(your parameter) to pass the ID value to flow.

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

 

 

 

View solution in original post

2 REPLIES 2
v-xiaochen-msft
Community Support
Community Support

Hi @PowerSäm ,

 

Could you tell me:

Do you want to create an item of sharepoint list in canvas and get the item's ID?

 

You could pass the parameter form canvas to flow. So you need to get ID from canvas.

For example:

Set(VarID,patch(....).ID)

vxiaochenmsft_0-1628154517695.png

vxiaochenmsft_1-1628154525951.png

vxiaochenmsft_2-1628154534963.png

After click on the button:

vxiaochenmsft_3-1628154557925.png

vxiaochenmsft_4-1628154566464.png

 

Now you could use yourflow.Run(your parameter) to pass the ID value to flow.

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

 

 

 

View solution in original post

@v-xiaochen-msft 

 

This is exactly what I was looking for, thank you. It works great. Thank you so much!

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,557)