Hi all,
I would really appreciate some help as I can't seem to figure this one out. I know how to replace characters, but what I am struggling with is how to replace the last comma in a string with an ' & '.
My text example is - Bob Smith, Julie White, Andrew Blaa, Lucy Luu
I would like the output to be - Bob Smith, Julie White, Andrew Blaa & Lucy Luu
I have used lastindexof to detetermine the position of the last comma e.g. lastIndexOf(outputs('TEXT'),',')
The question is now how do I replace it. The replace function expects a string and not an integer. I tried to use substring to give me the string value which resulted in a ',' which is correct, although it would then look to replace all commas. I only want to replace the last comma with an &
Any help would be greatly appreciated.