Currently I have a Form for entering 'line items', Submit button to Collect it to the same collection, and then a Gallery to Display said collection. This is eventually Patched to SQL later in my app, however I'm having trouble editing records since I don't have a unique key in a collection.
Essentially the Form is pointing to the Collection colLineItems. Since it's not a true datasource, all of my cards are custom cards, and my submit button simply collects the values of each text box, resets the form, sets it as a New form, and sets my LineItemSelected variable to Blank(). (That variable is populated with the selected item from the Gallery)
The Gallery is pointing to the same Collection, however if a user wanted to edit one of those records, my collection data is too dynamic to have a unique key. I was looking into including an incremental Sequence number an a sort of temporary key, however there's a chance that those wouldn't be unique either since costs and quantities are two of my Form fields.
Any ideas? I know this is an atypical use of a collection in a Form, but surely someone has tried to create something similar to this. I'm just not sure what the best way to go about it is.
Thanks in advance!
Solved! Go to Solution.
Hi @Stoikryz ,
If the incremental sequence number may also be duplicated and make it unusable, maybe you can consider using the GUID function.
https://docs.microsoft.com/en-us/power-apps/maker/canvas-apps/functions/function-guid#syntax
In addition, maybe you could generate a unique ID based on the current date & time(yyyymmddhhmmss)
Text(Now(),"yyyymmddhhmmss")
Best Regards,
Charlie Choi
Hi @Stoikryz ,
If the incremental sequence number may also be duplicated and make it unusable, maybe you can consider using the GUID function.
https://docs.microsoft.com/en-us/power-apps/maker/canvas-apps/functions/function-guid#syntax
In addition, maybe you could generate a unique ID based on the current date & time(yyyymmddhhmmss)
Text(Now(),"yyyymmddhhmmss")
Best Regards,
Charlie Choi
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.