Hello! This feels as though it should be fairly simple, but I'm trying to work around it.
I have a gallery galDivInnvUtstyr which lets the user tick of for any item that is desired, and a text-input for the amount of that item:
The problem occurs when I'm trying to retreive the data that the user have previously saved in SharePoint.
The data that is passed to SharePoint is a text string using the code:
Diverse_x0020_innvendig_x0020_ut: {Value:
Concat(
Filter(
galDivInnvUtstyr.AllItems,
chDivInnvUtstyr.Value = true
),
txtDivInnvUtstyrAmount.Text&" x "&Value, " + "
)}.Value
The string looks like:
5 x Medisinkoffert på vegg + 2 x Papirhåndkle-holder (stor type) + 3 x Søppelkurv 12L + 2 x Såpedispenser (standard type)
I usually store this into a collection which i call colListe.
And I can split the string using the following:
Last(FirstN(Split(First(colListe).'Diverse innvendig utstyr'.Value, " + "),1)).Value
Which becomes:
5 x Medisinkoffert på vegg
I just can't find a way to dynamically alter the order of the number that corresponds to the order of the chosen item.
Now, displaying whether the user has chosen the item or not is fairly simple with the code in the checkbox:
If(
chDivInnvUtstyr.Text in First(colListe).'Diverse innvendig utstyr'.Value,
true
)
But displaying the amount of items the users has put in becomes hard.
Any tips?
Thanks in advance!
John