cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Patch no longer working

I have a patch on a gallery that was working until the most recent update (Seems to have been updated today to 3.18122.23)

The patch is on a gallery (Gallery4) subtitle onselect, and it patches the data from Gallery4_1 that the user has input.

 

 

ForAll(  AddColumns(Gallery4_1.AllItems, "temporaryID", id),  UpdateIf(Answers, id = temporaryID, {Answer: If(Radio60_1.Selected.Value = "Yes", 1, Radio60_1.Selected.Value = "No", 0, Radio60_1.Selected.Value = "N/A",2, Blank()), Evidence: EvidenceBox.Text, DidWell: If(Checkbox4.Value = true, 1,0)}))

 

I have added a column (temporaryID) to provide disambiguation (cannot seem to be able to use the disambiguation operator with Gallery.AllItems).

 

Any help is appreciated.  I cannot publish any updates until I find a workaround for this.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Advocate II
Advocate II

Re: Patch no longer working

My primary concern is that they have improved the speed of the gallery, so I don't think it it has time to patch the collection before it changes screen. I tested this theory by having the patch on start of a timer triggered by the first gallery and then change the options on the second gallery when the timer ends - turns out that it patches fine doing this. I set the timer duration to 1 so that it's the lowest amount of time possible. I set the options by declaring the options as a variable (set on visible to set it the first time and then the change is triggered at the end of the timer).

 

On visible

This makes the first in my table the default selection and sets the second gallery's options from what is selected in the first gallery (SectionVar) 

UpdateContext({DefaultSel: Gallery12.Selected}); UpdateContext({DefaultSel:{}}); UpdateContext({DefaultSel: First(Set(SectionVar, Filter(Answers, SectionName = Gallery12.Selected.Result)) first gallery; UpdateContext({timer: true}) 

button on first gallery;

UpdateContext({timer: true})

- On timer start 

ForAll( AddColumns(Gallery4_1.AllItems, "temporaryID", id), UpdateIf(Answers, id = temporaryID, {Answer: If(Radio60_1.Selected.Value = "Yes", 1, Radio60_1.Selected.Value = "No", 0, Radio60_1.Selected.Value = "N/A",2, Blank()), Evidence: EvidenceBox.Text, DidWell: If(Checkbox4.Value = true, 1,0)})) 

On timer end; 

UpdateContext({timer:false}); Set(SectionVar, Filter(Answers, SectionName = Gallery12.Selected.Result)) 

 

I hope this helps

View solution in original post

2 REPLIES 2
Highlighted

Re: Patch no longer working

I have also been struggling with Patch() this morning. I opened an app that was working before the last update and all of a sudden;

Patch( [dbo].[] ) : Patch works perfectly

Patch( Collection ) : Patches blank values (even if the field has no update being pushed through the Patch.)

 

Reloading the Collection from the [dbo] seems to refresh all of the records to their true values, however, the local Collection is butchered every time I update a record.

 

Highlighted
Advocate II
Advocate II

Re: Patch no longer working

My primary concern is that they have improved the speed of the gallery, so I don't think it it has time to patch the collection before it changes screen. I tested this theory by having the patch on start of a timer triggered by the first gallery and then change the options on the second gallery when the timer ends - turns out that it patches fine doing this. I set the timer duration to 1 so that it's the lowest amount of time possible. I set the options by declaring the options as a variable (set on visible to set it the first time and then the change is triggered at the end of the timer).

 

On visible

This makes the first in my table the default selection and sets the second gallery's options from what is selected in the first gallery (SectionVar) 

UpdateContext({DefaultSel: Gallery12.Selected}); UpdateContext({DefaultSel:{}}); UpdateContext({DefaultSel: First(Set(SectionVar, Filter(Answers, SectionName = Gallery12.Selected.Result)) first gallery; UpdateContext({timer: true}) 

button on first gallery;

UpdateContext({timer: true})

- On timer start 

ForAll( AddColumns(Gallery4_1.AllItems, "temporaryID", id), UpdateIf(Answers, id = temporaryID, {Answer: If(Radio60_1.Selected.Value = "Yes", 1, Radio60_1.Selected.Value = "No", 0, Radio60_1.Selected.Value = "N/A",2, Blank()), Evidence: EvidenceBox.Text, DidWell: If(Checkbox4.Value = true, 1,0)})) 

On timer end; 

UpdateContext({timer:false}); Set(SectionVar, Filter(Answers, SectionName = Gallery12.Selected.Result)) 

 

I hope this helps

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,756)