Hello,
I'm trying to create an Internal Courier App where we can scan the barcodes and keep track of when a parcel has been delivered to the office, where that parcel currently is and when/who signed for it. I've created first part which is allowing someone to scan the barcode on the parcel which then creates a Sharepoint list record. The bit I'm struggling with is updating that record at a later date, what I'm trying to do is allow the user to scan the parcel barcodes when they get handed over from Security to our Facilities department and then updating the status of those records from "Accepted" to "Handover".
This is the code I'm using to add the new records (when security first scan the parcel(s), using the OnScan function):
Clear(GetBarCodes);
ForAll(
BarcodeReader1.Barcodes,
Collect(
GetBarCodes,
{
Barcodes: ThisRecord.Value
}
)
);
ForAll(
Gallery1.AllItems As aCodes,
Patch(
Parcels,
{
Title: aCodes.Barcodes,
Barcode: aCodes.Barcodes,
'Accepted Delivery': Now(),
'Parcel Status': {Value: "Accepted"},
'Accepted By': {
Claims: Concatenate(
"i:0#.f|membership|",
User().Email
),
Department: "",
DisplayName: User().FullName,
Email: User().Email,
JobTitle: "",
Picture: ""
}
}
)
);
I now have another screen called "Handover" which a member of the Facilities team will use to scan the same parcels once they have them. The issue I'm struggling with is I'd need to know the ID of the record of each parcel scanned and then apply the update to each of the scanned barcodes by changing the status from "Accepted" to "Handover". I'm having one of those days where my brain doesn't want to function, any guidance would be much appreciated in how i can achieve what I'm trying to do.
If you've any questions, please feel free to ask and I'll try my best to answer them for you. Thank you in advance.