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

Update sharepoint list from Collection

I have created an powerapp where I use the SharePoint List ID as a data entry to a collection - Based on that I would like to submit the collections by ID and update a text field to a constant "Delivered" - but nothing gets updated. Any help would be great. 

 

Entry field "Type=Number"

OnChange: Collect(ScanDel, {ID: Deliver.Text, Status_Txt: "Delivered"}); Reset(Deliver)

 

Submit: ForAll(ScanDel, Patch('SHPLIST', First(Filter('SHPLIST', ID = ScanDel.ID)) , {Status_Txt:"Delivered"}))

 

1 ACCEPTED SOLUTION

Accepted Solutions
JensSeiger
Level: Powered On

Re: Update sharepoint list from Collection

 

I figured it out. I needed to call the value of the field in the collection.  My warning showed me that I can't compare text with a value. 

That means I changed the collect to:

 

Collect(ScanDel, {ID: Value(Deliver.Text), Status_Txt: "Delivered"}); Reset(Deliver)

View solution in original post

6 REPLIES 6
Super User
Super User

Re: Update sharepoint list from Collection

@JensSeiger,

Your patch function syntax looks correct. You would put it as the OnSelect property of an icon or button to run it.

JensSeiger
Level: Powered On

Re: Update sharepoint list from Collection

Thank you for your fast reply. The Submit is a butron and unfortunately not working. Any ideas? Any difference as I am using the ID?
Super User
Super User

Re: Update sharepoint list from Collection

I wouldn’t think so. To find out where the problem is, test it without the ForAll. BTW, Is the delivered field a Choice or Lookup type column in your SharePoint list?

JensSeiger
Level: Powered On

Re: Update sharepoint list from Collection

No. It is a single line.
Super User
Super User

Re: Update sharepoint list from Collection

@JensSeiger 

The problem could be ID. You may want to try using the disambiguation operator 

ForAll(ScanDel, Patch('SHPLIST', First(Filter('SHPLIST', ID = ScanDel[@ID])) , {Status_Txt:"Delivered"})). If that works, please mark the discussion solved.

JensSeiger
Level: Powered On

Re: Update sharepoint list from Collection

 

I figured it out. I needed to call the value of the field in the collection.  My warning showed me that I can't compare text with a value. 

That means I changed the collect to:

 

Collect(ScanDel, {ID: Value(Deliver.Text), Status_Txt: "Delivered"}); Reset(Deliver)

View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,760)