Hi
I need help with being able to tell PowerApps to create and increment my reference number, this is a canvas app form and SharePoint Online is my data source
User1 will submit a form, but they will select from 1 of 3 screens only.
If User1 selects Screen1 I'd like to have my reference number display something like this
REW-B-00001
If User1 completes Screen2 it would be REW-C-00001
If the reference number is already REW-C-00001, Then ideally the next number depending on selection could be REW-B-00002
Is this possible, and how can i do this please?
Hi,
I have a similar issue and would appreciate your help. In my case I have a dropdown filed and trying to have auto incrementing id based on selected value and could look like this.
AA-00001
AA-00002
BB-00001
AA-00003
BB-00002
CC-00001
Check the 1st page of this thread. The solution is always at the top of the thread.
Plz send a link
Please start a new thread. This one has already been solved.
REW-B-00001
REW-B-00002
REW-C-00001
REW-B-00003
REW-C-00002
I Want this ,how create this type of data command
Thank you very much, I will try this out, either today or after the Easter break and report back, but your instructions are very precise, so I expect this will work, I will mark it answered once I've tested, if that's okay?
Very good question! The data will be populated by PowerApps.
However, I had not considered what would happen if there was no data to start. The code I provided should be modified like this...
Set(nextSequenceNumber, First(Sort(your_datasource_name, SequenceNumber, Descending).SequenceNumber;
Patch(
your_datasource_name,
Defaults(your_datsource_name),
{
ReferenceNumber: "REW-B-"&Text(nextSequenceNumber, "0000"),
SequenceNumber: If(!IsBlank(nextSequenceNumber),nextSequenceNumber, 0)
}
);
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."