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 / Patch problem with gal...
Power Apps
Answered

Patch problem with gallery

(0) ShareShare
ReportReport
Posted on by 134

i am 100% sure i am overthinking this, but for some reason i cannot seem to patch this. 

I have a collection (CLLocal) that is a filter from a very large list ('Contraband Log (CL)'). In the app I have a variable pulling the CLLocal (I could also pull it from AdminCLGal.Selected if that makes any difference) entry from a view page to an edit page. There are a LOT of columns that need to be able to be updated. 

 

The edit page gallery (CLAdminEditGal) only displays the one row on the list because of the size. How can I send the updates they make on the gallery to the list? Do I need to send it to the collection and then the list?  Honestly I've spent about 8 hours on this one page and cant make this one thing work for the life of me.

 

Below are my SPList columns and their accompanying input fields

 

{
CLDateOfContrabandDiscovery: CLDate.SelectedDate,
CLOffenderNumber: Value(CLNumber.Text),
CLOffenderLastName: CLName.Text,
CLOffenderSecurityLevel: Securitylevel.Selected.Value,
CLWhatWasTheTimeOfTheContrabandD: CLTime.Selected.Value,
CLWhatDayOfTheWeekWasTheContraba: DayofWeek.Selected.Value,
CLWhereInThePhysicalPlanWasTheC: CLPPLoc.Selected.Value,
CLIfContrabandWasDiscoveredInThe: Mailroom.Text,
CLIfContrabandWasDiscoveredInAHo: HousingUnit.Text,
CLTypeOfContraband: CLType.SelectedItems,
CLWeaponType: CLWeaponType.Selected.Value,
CLWeaponMaterial:CLWeaponMaterial.Selected.Value,
CLNarcoticType:CLNarcType.Selected.Value,
CLQuantityOfNarcoticsDiscovered: CLNarcNum.Text,
CLStreetValueOfContraband: CLNarcValue.Text,
CLDidAnAssultTakePlace: CLAssault.Selected.Value,
CLSummaryOfIncident: CLSummary.Text,
CLWasSmugglingAttemptedDuringThi: CLSmuggle.Selected.Value,
CLRaceOfOffender: CLRace.Selected.Value,
CLAgeGroup: CLAge.Selected.Value,
CLOffenderCrime: CLOffense.Selected.Value,
CLWhatIsTheERDofTheOffender: CLERD.Selected.Value,
CLDoesOffenderHavePassedDrugCrim: CLDrugCrime.Selected.Value,
CLContrabandLocation: CLSpecLoc.Selected.Value,
CLWasAPoliceReportFiled: LEAToggle.Value,
CLWasACIRGenerated: CIRToggle.Value,
CIRNumber: CLCIRNum.Text,
MSPComplaintNumber: CLLEANum.Text,
Wasthecontrabandfoundwithascanne: CLScanner.Value,
Whichscanner_x003f: CLScannerused.Selected.Value
}

Pg 1

BHaapi_0-1697140990806.png

Pg 2

BHaapi_1-1697141011413.png

 

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    154,393 Most Valuable Professional on at

    Hi @BHaapi ,

    I have to make some assumptions here as your model is not totally clear to me, but assuming this is a SharePoint List and you are selecting the record from AdminCLGal and then setting your Variable

    Set(CLLocal, AdminCLGal.Selected)

    which if you put OnSelect of the Gallery, you can do this

    Set(CLLocal, ThisItem)

    and the controls on the screen are based on the Record Variable CLLocal, then you would Patch them back to the selected record like this. Note I have not looked at the validity of the values you are patching.

    Patch(
     ('Contraband Log (CL)',
     {ID: CLLocal.ID},
     {
     CLDateOfContrabandDiscovery: CLDate.SelectedDate,
     CLOffenderNumber: Value(CLNumber.Text),
     CLOffenderLastName: CLName.Text,
     CLOffenderSecurityLevel: Securitylevel.Selected.Value,
     CLWhatWasTheTimeOfTheContrabandD: CLTime.Selected.Value,
     CLWhatDayOfTheWeekWasTheContraba: DayofWeek.Selected.Value,
     CLWhereInThePhysicalPlanWasTheC: CLPPLoc.Selected.Value,
     CLIfContrabandWasDiscoveredInThe: Mailroom.Text,
     CLIfContrabandWasDiscoveredInAHo: HousingUnit.Text,
     CLTypeOfContraband: CLType.SelectedItems,
     CLWeaponType: CLWeaponType.Selected.Value,
     CLWeaponMaterial:CLWeaponMaterial.Selected.Value,
     CLNarcoticType:CLNarcType.Selected.Value,
     CLQuantityOfNarcoticsDiscovered: CLNarcNum.Text,
     CLStreetValueOfContraband: CLNarcValue.Text,
     CLDidAnAssultTakePlace: CLAssault.Selected.Value,
     CLSummaryOfIncident: CLSummary.Text,
     CLWasSmugglingAttemptedDuringThi: CLSmuggle.Selected.Value,
     CLRaceOfOffender: CLRace.Selected.Value,
     CLAgeGroup: CLAge.Selected.Value,
     CLOffenderCrime: CLOffense.Selected.Value,
     CLWhatIsTheERDofTheOffender: CLERD.Selected.Value,
     CLDoesOffenderHavePassedDrugCrim: CLDrugCrime.Selected.Value,
     CLContrabandLocation: CLSpecLoc.Selected.Value,
     CLWasAPoliceReportFiled: LEAToggle.Value,
     CLWasACIRGenerated: CIRToggle.Value,
     CIRNumber: CLCIRNum.Text,
     MSPComplaintNumber: CLLEANum.Text,
     Wasthecontrabandfoundwithascanne: CLScanner.Value,
     Whichscanner_x003f: CLScannerused.Selected.Value
     }
    }

     

    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.

    MVP (Business Applications)   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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#2
Haque Profile Picture

Haque 69

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard