web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patching changed data ...
Power Apps
Unanswered

Patching changed data from a collection back into a dataverse table including a Yes/No column

(0) ShareShare
ReportReport
Posted on by 18

Good Day,

This particular issue has stumped me for the past few days.

 

I pull data into a collection (colProjRequests) from a dataverse table 'Project Requests'. In this dataverse table is a Yes/No toggle on a column called Request Active

I present this data, along with some related data in a Gallery.

I have added into the gallery a button that allows the user to close or open a request, and patches this back to the collection. Using this formula.

If(ThisItem.'Request Active' = 'Request Active (Project Requests)'.Yes,Patch(colProjRequests,LookUp(colProjRequests,ID=ThisItem.ID),{'Request Active':'Request Active (Project Requests)'.No}),Patch(colProjRequests,LookUp(colProjRequests,ID=ThisItem.ID),{'Request Active':'Request Active (Project Requests)'.Yes}))

I then filter the gallery on Yes/No status. This works.

However whenever I try to patch that collection back to the dataverse table it doesn't change the toggle for yes/no. 

 

I have a separate button that patches the gallery back to the dataverse table and it uses the following formula.

 

Patch('Project Requests',colProjRequests)

 I have looked at a few similar posts on this forum, and have tried a few other methods. I dont really want to revert to editing the dataverse table directly. Is anyone able to help, please?

Categories:
  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @JezHolland 

     

    you can try this:

    If(
     ThisItem.'Request Active',
     Patch(
     colProjRequests,
     LookUp(colProjRequests, ID = ThisItem.ID),
     {'Request Active': false}
     ),
     Patch(
     colProjRequests,
     LookUp(colProjRequests, ID = ThisItem.ID),
     {'Request Active': true}
     )
    )
    

     

    Patching back try this:

    ForAll(
     colProjRequests,
     Patch(
     'Project Requests',
     LookUp('Project Requests', ID = ID),
     {'Request Active': 'Request Active'}
     )
    )
    

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • JezHolland Profile Picture
    18 on at

    Unfortunately, whilst the first one works the 2nd doesnt. What isnt helpful is that it isnt throwing out any error messages so it looks like it might be working. It just isnt taking the value from that particular column in the collection.

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard