Showing results for 
Search instead for 
Did you mean: 
Helper IV
Helper IV

Having problem patching to secondary list from gallery and collection whether clear or collect not working properly.

I got a problem with patching a gallery from a collection into a secondary list.

Firstly i have a button that navigates to a new screen, on this button onselect properties is 

NewForm(NewWDS); ClearCollect(WDSConsumCollection, {WDSWC:"", WDSBrand:"", WDSPro:"", WDSFea:"", WDSShift:"", WDSDay:"", WDSDate:"", WDSWPS:"", WDSClass:"", WDSDia:"", WDSHeat:"", WDSFClass:"", WDSFBrand:"", WDSFLotNo:"", WDSPreTemp:"", WDSInterTemp:"", WDSGasType:"", WDSGasFlow:"", WDSWLayer:"", WDSCurrent:"", WDSVolt:"", WDSTravel:"", WDSWFR:"", WDSHInput:""});Navigate(WelderNewWDS,ScreenTransition.Fade)

This will lead to another screen where first portion is a form that updates the parent list - WDS

and bottom part is a gallery that has a button to create repeating table and patches the child list. - WDS operations

this is the code for the patch button :

Patch(WDSConsumCollection, ThisItem, {WDSWC: InputWC.Text, WDSBrand:InputBrand.Text,WDSPro:InputPro.Text,
WDSTravel:InputTravel.Text,WDSWFR:InputWFeedRate.Text,WDSHInput:WDSHeatInput.Text});Collect(WDSConsumCollection, {WDSWC:"",WDSBrand:"",WDSPro:"",WDSFea:"",WDSShift:"",WDSDay:"",WDSDate:"",WDSWPS:"",WDSClass:"",WDSDia:"",WDSHeat:"",WDSFClass:"",WDSFBrand:"",WDSFLotNo:"",WDSPreTemp:"",WDSInterTemp:"",WDSGasType:"",WDSGasFlow:"",WDSWLayer:"",WDSCurrent:"",WDSVolt:"",WDSTravel:"",WDSWFR:"",WDSHInput:""})

Now on the onchange property of the form is as below, the MasterID is a number column on the child list pulling the ID from the parent list WDS. ID column in parent list is the unhidden ID column from sharepoint.

ForAll(WDSConsumCollection, Patch(WDSOperations, Defaults(WDSOperations), {Workcentre:WDSWC, Brand:WDSBrand, WeldProcess:WDSPro, WeldFeature:WDSFea, Shift:WDSShift, DayNight:WDSDay, Date:WDSDate, WPS:WDSWPS, WireClass:WDSClass, WireDiameter:WDSDia, WireHeat:WDSHeat, FluxesClass:WDSFClass, FluxesBrand:WDSFBrand,
FluxesLotno:WDSFLotNo, PreheatTemp:WDSPreTemp, InterpassTemp:WDSInterTemp, GasType:WDSGasType, GasFlowrate:WDSGasFlow, WeldLayer:WDSWLayer, Current:WDSCurrent, Volt:WDSVolt, TravelSpeed: WDSTravel,
WireFeedrate:WDSWFR, HeatInput:WDSHInput, MasterID: NewWDS.LastSubmit.ID}))

Submit button on the screen code:



Apparently the parent list is updated with the form details but the patch collection is not working , its not updating the child list and also the clear collect doesn't seem to clear the past entries after when i navigate out and return to the very first screen.

Can someone help me please?


Accepted Solutions
Helper IV
Helper IV

Managed to resolve this, had to remove the reset form code on the onsuccess of the form.

View solution in original post

Helper IV
Helper IV

Managed to resolve this, had to remove the reset form code on the onsuccess of the form.

View solution in original post

Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,584)