Skip to main content

Notifications

Community site session details

Community site session details

Session Id : nZxlTIRUGHIdHbMeoeUsJ3
Power Automate - Building Flows
Answered

Removing a character from an array

Like (0) ShareShare
ReportReport
Posted on 7 Aug 2020 02:32:10 by

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. 

CParker_2-1596765109671.png

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).

CParker_3-1596765166261.png

 

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......

 

  • Community Power Platform Member Profile Picture
    on 10 Aug 2020 at 03:56:38
    Re: Removing a character from an array

    Hi @v-litu-msft 

    I worked it out!

     

    I used the below code(?) to reinsert the Email header.

    CParker_0-1597031609118.png

    Also, the Compose/Join doesn't seem to be required as it gives the desired result without it.

    CParker_1-1597031765929.png

     

    Thanks for your help!

  • Community Power Platform Member Profile Picture
    on 10 Aug 2020 at 00:03:55
    Re: Removing a character from an array

    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.

    CParker_0-1597017615025.png

     

    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.)

  • Verified answer
    v-litu-msft Profile Picture
    on 07 Aug 2020 at 08:23:41
    Re: Removing a character from an array

    Hi @Anonymous,

     

    You could following these steps and expression to remove ";" and convert the array into a string:

    replace(item()?['Email'],';','')
    join(variables('Emails'),',')

    Annotation 2020-08-07 112340.jpg

     

    Annotation 2020-08-07 112341.jpg

     

    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.

  • Community Power Platform Member Profile Picture
    on 07 Aug 2020 at 03:20:37
    Re: Removing a character from an array

    Hi @edgonzales!

     

    It's coming from a CDS (ce) List action (from D365)

    CParker_0-1596770366318.png

    I'm not sure if/how a replace could be used with this......

  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on 07 Aug 2020 at 02:40:23
    Re: Removing a character from an array

    @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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,668 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard
Loading started