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
Pg 2
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
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional