cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JensVolswinkler
Regular Visitor

Patch Sharepoint list when a gallery item is marked does not work

I have a gallery with checkboxes. The gallery uses data from sharepoint.

If a checkbox is marked and I click on a button the marked items in sharepoint shall be patched (column "Send" shall be set to "true").

I tried the following code, but the sharepoint list is not patched.

 

ForAll(Filter(Gallery.AllItems; CheckboxAuswählen.Value = true); Collect(MarkedItems; {string:Titel});;
Patch(SharepointList; LookUp(SharepointList; Titel= First(MarkedItems).string); {Send: true});;
Remove(MarkedItems;First(test)));;

 

Thanks a lot!

1 ACCEPTED SOLUTION

Accepted Solutions
KvB1
Solution Sage
Solution Sage

If the items property of your gallery directly has your sharepoint list as a source, you can just use "ThisRecord" Instead of the lookUp

 

Something like: 

 

ForAll(
       Filter(
              Gallery.AllItems;
              CheckboxAuswählen.Value=true
              );
       Patch(
             SharePointList;
             ThisRecord;
             {
              Send: true
             }
       )
)

 

 

Please check syntax i freehanded

View solution in original post

5 REPLIES 5
RezaDorrani
Dual Super User
Dual Super User

Hi @JensVolswinkler 

 

Check https://youtu.be/VzrarcM9W5k

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Thanks,
Reza Dorrani, MVP
YouTube
Twitter

JensVolswinkler
Regular Visitor

Hi @RezaDorrani I watched some parts of your videos, but I am not sure if they can help me in this concrete case...will probably have to watch them in full.

 

I replaced "Titel= First(MarkedItems).string" with "Titel = ExistingTitle" and the sharepoint entry with the existing title got patched....

therefore I assume that "Titel= First(MarkedItems).string" is not working as expected.

Why is that the case? 

 

Why is that the case?

JensVolswinkler
Regular Visitor

I can stil not figure it out...the video has a lots of interesting informations @RezaDorrani but I do not see how it helps me solve my problem.

Could you please tell me in which part of the video you think is the solution - 

or directly explain to me how I can solve this.

 

Thanks a lot in advance!

KvB1
Solution Sage
Solution Sage

If the items property of your gallery directly has your sharepoint list as a source, you can just use "ThisRecord" Instead of the lookUp

 

Something like: 

 

ForAll(
       Filter(
              Gallery.AllItems;
              CheckboxAuswählen.Value=true
              );
       Patch(
             SharePointList;
             ThisRecord;
             {
              Send: true
             }
       )
)

 

 

Please check syntax i freehanded

This was exactly the solution I've been searching for hours to find! 

 

I hope others find this solution when you cannot match an ID in a collection with an ID in a SharePoint list. Above is what helped me with my patch to update a SharePoint list with a collection's data.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (1,964)