How can I trim the last character from a string where I am concatenating the email address with ; as delimiter? I do not need the last semi-colon.
Any help is much appreciated.
did you try to use
This solution will replace all instances of ';' which is not quite what I wanted. I finally opted for the solution in https://powerusers.microsoft.com/t5/General-Power-Automate/Removing-the-last-character-in-the-string...
This worked, albeit a small typo by me which is why it didn't work first time.
For anyone else looking, this will only remove the trailing ; if it is there.
if(equals(last(triggerBody()['email']), ';'), substring(triggerBody()['email'], 0, add(length(triggerBody()['email']), -1)), triggerBody()['email'])
Replace the text in blue with your input.