cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jdun
Level: Powered On

Send an HTTP request to Sharepoint to Update List Items

What I want to do is:

 

1. Trigger flow when Item is Created/Modified on a 'Projects' List

2. Condition that if "Job Status" is equal to "Lost Bid"

3. Choose that list's 'Link' column (which is the projects generated Team Site link) 

4. Update a list within this new site called 'Products' to have the 'outcome' column of all items listed here updated to "Lost"

 

I can create this flow without any issues when I reference a 'Products' list specifically attached to a project site. However, I need to be able to dynamically generate which products list is being updated. I believe the "Send an HTTP request to SharePoint" is the correct method to do this, but I'm having troubles figuring out how I would build this portion of the flow as I'm new to REST API's.

 

Any help would be greatly appreciated.

 

3 REPLIES 3
Community Support Team
Community Support Team

Re: Send an HTTP request to Sharepoint to Update List Items

Hi @jdun,

 

Do you want to use Send an HTTP request to SharePoint to Update All Items of the 'outcome' column?

 

Please take a try with the following workaround:

 

11.PNG

 

The flow works successfully as below:

 

12.PNG

 

For more details on SharePoint http request, please refer to link:

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-re...

 

Please take a try and feel free reply if you need more help.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jdun
Level: Powered On

Re: Send an HTTP request to Sharepoint to Update List Items

Hi Barry,

 

This works if I know the site address to the specific list I want to update. My issue is I need to dynamically generate which project site belongs to the updated "Lost Bid" project. Because I am dynamically generating the site address it is not finding any values for the list.

 

So in this step I have selected my Projects list and then created a variable for my new Site Address to my prj subsite using the created or modified items ID to dynamically generate which project site to reference. If the Job Status value is equal to "Lost Bid" for the item being created/modified then do Step 2, if not do nothing.

 

flowpart1.PNG

  

Step 2, I want to get the items from the project site that we dynamically generated into our variable, and reference it's Products list. From here we want to update the 'outcome' value in each item in the Products list to "Lost". So is there a way to iterate through the list items to update them without using the ID variable since it does not show up in the list due to the dynamic site address requiring an input?

 

FlowPart2.PNG

 

Thank you,

 

Jeff

 

jdun
Level: Powered On

Re: Send an HTTP request to Sharepoint to Update List Items

@v-bacao-msft

Is there a way I can extract the ID from the Current Item array perhaps? Or at least a way to check if it is not null and increase an integer variable (not ideal but better than nothing)?

Helpful resources

Announcements
firstImage

Microsoft Flow Online Conference

Join us for a FULL day of FREE Microsoft Flow Sessions from some of the best minds in the industry!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 39 members 4,411 guests
Recent signins:
Please welcome our newest community members: