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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Updating a Collection,...
Power Apps
Unanswered

Updating a Collection, then doing a Patch - value not updating OnChange

(0) ShareShare
ReportReport
Posted on by

Hi

I found a bug in my App that I just can't debug/fix. I thought it was all working fine until someone mentioned that a score didn't add up.

In the App I have a Gallery-style form capturing scores as a collection (updating when a change is made to the values) Everything works fine except for this specific use case

 

I have done a little video

Powerapp collection (1).gif

 

Basically, if I update the dropdown the corresponding score for that is collected and added to a total.

The collection is updating the dropdown.value & the total - as you can see, the scores next to each dropdown update & the total is updated.

However, in the video you can see the Collection in realtime - the total in there, which references the total in the SPlist does not update as expected

 

Some of the update statement for the collection is below 'Trust alignment Alignment' is a text field in my SPlist

UpdateIf(
 colTriageDetails,
 ID = ThisItem.ID,
 {
 'Request ID': varCurrentRecord.'Request ID',
 'Request Name': varCurrentRecord.Title,
 Summary: txtSummary_1.Text,
 
 'Advancing Our Digital Capability': dpdDigitalCapability.SelectedText,
 'Collaborating With Our Partners': dpdCollaborating.SelectedText,
 'Improving Quality For Patients': dpdImprovingQuality.SelectedText,
 'Making Our Money Work': dpdMakemoneywork.SelectedText,
 'Supporting Our People': dpdSupportourpeople.SelectedText,
 'Transforming Our Services': dpdTransform.SelectedText,
 'Trust Strategy Alignment (out of 60)': txtTrustTotal_1.Text,

Then the patch (on a save button) is

Patch(
 'Request Assessment',
 ShowColumns(
 colTriageDetails,
 "Title",
 "Request_x0020_Name",
 "Summary",
 
 "Advancing_x0020_Our_x0020_Digita",
 "Collaborating_x0020_With_x0020_O",
 "Improving_x0020_Quality_x0020_Fo",
 "Making_x0020_Our_x0020_Money_x00",
 "Supporting_x0020_Our_x0020_Peopl",
 "Transforming_x0020_Our_x0020_Ser",
 "Trust_x0020_Strategy_x0020_Align",

All the other fields update fine, I just can't get this one to be the same as the actual Sum of the scores

 

Might be tricky to fix I know but I really can't work out what is wrong

Thanks

Steven

 

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    on at
    Re: Updating a Collection, then doing a Patch - value not updating OnChange

    Hi @steshepherd ,

     

    Do you mean the collection won't get updated when changing selections in the Dropdown? Is the UpdateIf function in the OnChange property?

     

    Best regards,

  • Verified answer
    steshepherd Profile Picture
    on at
    Re: Updating a Collection, then doing a Patch - value not updating OnChange

    Fresh eyes this morning - I worked out it was to do with the Onchange for the textbox that was storing the total value. It wasn't firing the onchange immediately, so I took a lead from this video on YT and used a slider to force the onchange

    https://www.youtube.com/watch?v=kzIv6kNuzJ4 

     

    The onchange property selects a button - the button onselect property has the updateif statement in it.

     

    Seems to be updating as I hoped!

    Thanks

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard