In my form I have a couple of text inputs that add to a collection. On input, it separates each item in the collection with |.
It then saves the collection to a SharePoint field and it will look something like
1;test1;no;yes|2;test2;no;yes|3;test3;yes;yes|4;test4;no;no|
I'm displaying the collection in a gallery by splitting it at |. The problem is on the last | it assumes there's another item after it, but there isn't, that's support to be the end.
I used Left(varStringofCollection, len(varStringofCollection) -1) to remove the ending | and that works.
But the problem I noticed is that some users will open the item multiple times before saving it and instead of it opening as
1;test1;no;yes|2;test2;no;yes|3;test3;yes;yes|4;test4;no;no
It will open as
1;test1;no;yes|2;test2;no;yes|3;test3;yes;yes|4;tes
basically removing parts of the collection. I want to only remove the last | from the string. If it's not there, then do nothing.
Any ideas?
Thanks!