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: Other fields...
Power Apps
Unanswered

Patching: Other fields are deleted

(0) ShareShare
ReportReport
Posted on by 62

Hi,

 

 

I have a checkbox that selects bulk item that needed to be updated however when I update only one field the other ones are deleted. So changed the Status to "Planned" and the rest (Assigned To and Date) was deleted.

 

patch.jpg

 

Here's the my code in the Update button:

ForAll(
 Filter(
 Gallery2.AllItems,
 Checkbox1.Value = true
 ) As vEdit,
 Patch(
 QAOversight_RegisterCaseTables,LookUp(QAOversight_RegisterCaseTables, Id = vEdit.Id),
 {crfad_entrystatus:EntryStatus_Overview_1.Selected.Value,
 crfad_assignedto: Label_assignedTo.Text,
 crfad_selecteddate:DateValue_SelectedDate_Overview_1.SelectedDate
 
 }
 )
)

 

 Any help appreciated!

 

Regards,

M

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at

    Hi @mayarnaldo15 ,

    Are you running anything inside the gallery (this will reset unbound controls) - are you saying this is happening when you press the Update button as it should certainly work with the code you have (assuming Id is your identifier - what is your data source)?

  • mayarnaldo15 Profile Picture
    62 on at

    Hi,

     

    I am not running anything inside the Gallery.

    Yes, this is happens when I press Update.

    Id is the identifier.

    QAOversight_RegisterTables is the Datasource.

     

    I hope this clears up 🙂

     

    Thank you for your time!

     

    /M

     

    QAOversight

  • WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at

    Hi @mayarnaldo15 ,

    Your code

    ForAll(
     Filter(
     Gallery2.AllItems,
     Checkbox1.Value
     ) As vEdit,
     Patch(
     QAOversight_RegisterCaseTables,
     LookUp(
     QAOversight_RegisterCaseTables, 
     Id = vEdit.Id
     ),
     {
     crfad_entrystatus: EntryStatus_Overview_1.Selected.Value,
     crfad_assignedto: Label_assignedTo.Text,
     crfad_selecteddate: DateValue_SelectedDate_Overview_1.SelectedDate
     }
     )
    )

    is filtering your gallery by items with the checkbox (in the gallery) checked and then updating three fields in these records in the data source with the values in three controls outside the gallery (so all the values will be the same on each record). What exactly other than this is happening that you don't want to.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • mayarnaldo15 Profile Picture
    62 on at

    Hi @WarrenBelz ,

     

    Thank you for your time looking onto this.

     

    I tried the code and it works when updating the three fields but what if I just want to update the one field for example crfad_entrystatus and leave the other two fields the same information as it is, how do I do that? When I tried the code and updated one field, the other fields changed into blank.

     

    Thank you again! 🙂

     

    /M

  • WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at

    Hi @mayarnaldo15 ,

    Just leave the other two fields out of the code - you can update any one (or more) of then you need to.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

     

  • mayarnaldo15 Profile Picture
    62 on at

    HI,

     

    Thank you again!

     

    So it means it is not possible to update only one field else they will save as blank?

    That's a unfortunate 😞


    /M

  • WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at

    Hi @mayarnaldo15 ,

    If you really want to you can make the Patch conditional (example with three Variables)

    ForAll(
     Filter(
     Gallery2.AllItems,
     Checkbox1.Value
     ) As vEdit,
     Patch(
     QAOversight_RegisterCaseTables,
     LookUp(
     QAOversight_RegisterCaseTables, 
     Id = vEdit.Id
     ),
     {
     crfad_entrystatus: If(var1,EntryStatus_Overview_1.Selected.Value),
     crfad_assignedto: If(var2,Label_assignedTo.Text),
     crfad_selecteddate: If(var3,DateValue_SelectedDate_Overview_1.SelectedDate)
     }
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at

    Hi @mayarnaldo15 ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • mayarnaldo15 Profile Picture
    62 on at

    Hi @WarrenBelz ,

     

    Can you explain how the patching condition with variables? 

     

    Thank you so much! 🙂

     

    /M

  • WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at

    Hi @mayarnaldo15 ,

    I am simply giving you the structure - if you set any of those three variables to true, depending on what you need, it will write to the relevant field.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard