My latest app uses a collection to assign a number of unique sample IDs to the ticket raised.
This works fine, as you can see above. This collection is then concat'd together to write to the data source.
If(TicketForm.Mode = FormMode.New, Concat(SampleID, Sample_ID & "/" & Your_Ref & "; "), PlainText(Parent.Default))
My question comes in when I then allow users to view, and potentially edit their previously submitted ticket. I essentially want to 'recollect' the data in the 'SampleID' column into a collection so it will be visible in the gallery as above. I guess I need to have some sort of mix of Split, Left, and Right to do it but I can't seem to work it out.
So in short, I need to change a string of text which looks like
CSM-1-A/1; CSM-1-B/12; CSM-1-C/123; CSM-1-D/1234;
Into a collection which looks like
Sample_ID | Your_Ref |
CSM-1-A | 1 |
CSM-1-B | 12 |
CSM-1-C | 123 |
CSM-1-D | 1234 |
Is this possible?
Solved! Go to Solution.
Hi @misc
Something along the lines of this should work for you:
AddColumns(Split("CSM-1-A/1; CSM-1-B/12; CSM-1-C/123; CSM-1-D/1234;", ";"),
"Sample_ID",First(Split(Result, "/")).Result,
"Your_Ref",Last(Split(Result, "/")).Result
)
Hi @misc
Something along the lines of this should work for you:
AddColumns(Split("CSM-1-A/1; CSM-1-B/12; CSM-1-C/123; CSM-1-D/1234;", ";"),
"Sample_ID",First(Split(Result, "/")).Result,
"Your_Ref",Last(Split(Result, "/")).Result
)
Thank you! I added that on the edit form icon and it worked once I added in the collect again,
Collect(SampleID,AddColumns(Split(DataCardValue17.Text, ";"),
"Sample_ID",First(Split(Result, "/")).Result,
"Your_Ref",Last(Split(Result, "/")).Result
))
Much appreciated!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
169 | |
94 | |
66 | |
64 | |
61 |
User | Count |
---|---|
223 | |
160 | |
93 | |
83 | |
80 |