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 / forall function and patch
Power Apps
Unanswered

forall function and patch

(0) ShareShare
ReportReport
Posted on by 249

hello

am using employees dataverse table

I want to do a function that will change "job" column to yes for all employees table 

am writing for all function to loop in each item of the table and change the item job to yes

But its giving an error cant figure it why, video of my errors below

patch.mp4

Categories:
  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @chahineatallah1 ,

     

    If you want to Patch all Items in the Gallery, you will need to use Gallery1.AllItems instead of Gallery1.Selected.

     

    In addition, a ForAll preceded by a Patch is inefficient. You should switch them around:

     

    Patch (
     employees,
     ForAll(
     Gallery1.AllItems,
     {
     job: Dropdown1.Selected.Value
     }
     )
    )

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard