Hi All,
I'm trying to use Power Automate with some email records and have come to an issue with ;'s in the array I have.
This is the array I have (below) and I'd like to remove the semi-colon (;) from the end of the email addresses.
I went down the path of converting the array to a string, then using split to turn it back into an array (using ; as the delimiter), which removed the ; but I ended up with more unwanted characters than I had previously (see below).
I was hoping that someone had a non-convoluted way to solve my issue, of simply removing the ; symbols from the array stored in varQuickCampCandEmailAdd......
Hi @v-litu-msft
I worked it out!
I used the below code(?) to reinsert the Email header.
Also, the Compose/Join doesn't seem to be required as it gives the desired result without it.
Thanks for your help!
Hi @v-litu-msft ,
Thanks for getting back to me and your advice.
They've given me the key data that I'm after, but the header (Email) is missing from the output (see below). I'm not sure if that will be a problem for the next steps in my flow or not.
Do you have any ideas of how to insert the "Email" header back into the array?
(I've got another question which will involve the use of this cleaned array, but I'll create a new post for that one.)
Hi @Anonymous,
You could following these steps and expression to remove ";" and convert the array into a string:
replace(item()?['Email'],';','')
join(variables('Emails'),',')
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @edgonzales!
It's coming from a CDS (ce) List action (from D365)
I'm not sure if/how a replace could be used with this......
@Anonymous
How are the email addresses being added to the array? Is there an opportunity to use Replace() as they are added?
Keep us posted.
-Ed
If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.
David_MA
135
Super User 2025 Season 1
Michael E. Gernaey
132
Super User 2025 Season 1
stampcoin
125