Skip to main content

Notifications

Community site session details

Community site session details

Session Id : pVWJ/KCR50/ClSAwG6FAEw
Power Apps - Building Power Apps
Answered

Update the status of all items in gallery

Like (0) ShareShare
ReportReport
Posted on 10 Jul 2023 06:09:43 by 29

Hi, I want to update all the items in my gallery, but i have some error that i cannot fix it.

GalleryName: GalleryApproval

DataSource:Dataverse

Columnt Type: travel Status is a choice column

 

 

ForAll(
 GalleryApproval.AllItems,
 Patch(
 HR_Travel_Request_Monitoring,
 LookUp(HR_Travel_Request_Monitoring, ID = GalleryApproval.Selected.ID),
 { 'Travel Status': {Value: "Completed"}}
 )
)

 

 

  • jco0 Profile Picture
    29 on 10 Jul 2023 at 09:21:04
    Re: Update the status of all items in gallery

    It Worked. Thank you @v-mingkz-msft 

  • Verified answer
    v-mingkz-msft Profile Picture
    Microsoft Employee on 10 Jul 2023 at 09:16:55
    Re: Update the status of all items in gallery

    Hi @jco0,

    ForAll(
     GalleryApproval.AllItems As AllItems,
     Patch(
     [@'HR_Travel_Request_Monitoring'],
     LookUp([@'HR_Travel_Request_Monitoring'], ID = AllItems.ID),
     {'Travel Status':"Completed"}
     )
    )

    vmingkzmsft_0-1688980551083.png

     

    vmingkzmsft_1-1688980570493.png

    Best Regards,

    Kyrie

     

  • jco0 Profile Picture
    29 on 10 Jul 2023 at 08:35:31
    Re: Update the status of all items in gallery

    Hi @v-mingkz-msft ,

     

    i tried your solutions, but nothing happened after i try your code.

     

    thank you

  • v-mingkz-msft Profile Picture
    Microsoft Employee on 10 Jul 2023 at 08:15:39
    Re: Update the status of all items in gallery

    Please try:

    ForAll(
     GalleryApproval.AllItems,
     Patch(
     [@'HR_Travel_Request_Monitoring'],
     LookUp([@'HR_Travel_Request_Monitoring'], ID = ThisRecord.ID),
     {'Travel Status':"Completed"}
     )
    )
  • jco0 Profile Picture
    29 on 10 Jul 2023 at 07:52:23
    Re: Update the status of all items in gallery

    it just updated the selected item not all the items in gallery

  • v-mingkz-msft Profile Picture
    Microsoft Employee on 10 Jul 2023 at 07:44:57
    Re: Update the status of all items in gallery

    Hi @jco0,

    Please try:

    ForAll(
     GalleryApproval.AllItems,
     Patch(
     [@'HR_Travel_Request_Monitoring'],
     LookUp([@'HR_Travel_Request_Monitoring'], ID = GalleryApproval.Selected.ID),
     {'Travel Status':"Completed"}
     )
    )

     

    Best Regards,

    Kyrie

  • jco0 Profile Picture
    29 on 10 Jul 2023 at 07:21:35
    Re: Update the status of all items in gallery

    i just want to update the items inside of the gallery

  • v-mingkz-msft Profile Picture
    Microsoft Employee on 10 Jul 2023 at 07:03:15
    Re: Update the status of all items in gallery

    Hi @jco0,

    Do you want to update all items in Dataverse table?

    Please try:

    UpdateIf('HR_Travel_Request_Monitoring',true,{'Travel Status':"Completed"})

     

    Best Regards,

    Kyrie

  • jco0 Profile Picture
    29 on 10 Jul 2023 at 06:39:01
    Re: Update the status of all items in gallery

    Detailed error information

    jco0_0-1688971134508.png

    jco0_1-1688971279339.pngjco0_2-1688971308587.png

     

     

  • jco0 Profile Picture
    29 on 10 Jul 2023 at 06:36:37
    Re: Update the status of all items in gallery

    still the same 😞

     

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
MS.Ragavendar Profile Picture

MS.Ragavendar 10

#2
LC-26081402-0 Profile Picture

LC-26081402-0 6

#3
EE-04041031-0 Profile Picture

EE-04041031-0 4

Overall leaderboard