Skip to main content

Notifications

Community site session details
Power Automate - Building Flows
Answered

Condition if string contains a specific character

Like (0) ShareShare
ReportReport
Posted on 15 Apr 2021 19:39:41 by 4

Hi ladies and gents,

 

I'm new to this beautiful platform, so lot's of had banging πŸ™‚ Especially with the following:

I'm trying to create a flow that adds items to a SharePoint list. The list has two columns, a groupName (string) column and Approvers (User or Group) column. I'm trying to populate this using an array (parsed from JSON). Some of the items have multiple approvers, these are separated with semicolons. What I want to do next is;

for each ArrayItem in array, 

IF arrayItem.approvers contains ';' {split the approvers then create sharepoint item}

 

But I'm getting the weirdest error:

Earthling87_1-1618515464931.png

 

Doesn't make sense to me. The flow itself looks like this at the moment:

Earthling87_2-1618515524255.png

 

What should I be looking at to get this going? And is this the right approach at all? Help a noob out πŸ™‚

 

  • CalebG Profile Picture
    14 on 24 Aug 2023 at 18:54:11
    Re: Condition if string contains a specific character

    I know this is a little late, but I was going through this post and saw your question. If you just do an expression with string('@'), you should be able to achieve that.

  • VincentA Profile Picture
    2 on 21 Jul 2023 at 09:16:04
    Re: Condition if string contains a specific character

    hello,

    this nice & simple solution seems to fail with the @ character .... When i enter that '@' in the dedicated aread .... that character start to duplicate randomly (nothing to do with my keyboard ;-)) , and if by chance i managed to get only one character being set ... it gets duplicated as i press "Save" ... Can you observe/reproduce the same ?  Thanks.

  • Githendra23 Profile Picture
    150 on 17 Jun 2022 at 13:05:19
    Re: Condition if string contains a specific character

    Hi! 

    i have a question, how do I add more caracters ? Do I just add ,(";"),("/") etc.. ?

  • Earthling87 Profile Picture
    4 on 16 Apr 2021 at 09:02:26
    Re: Condition if string contains a specific character

    Hi @v-litu-msft , Thanks foe your reply. I'll give that a try and see if it helps me further. I'll get reply with feedback.

  • Verified answer
    v-litu-msft Profile Picture
    on 16 Apr 2021 at 05:45:50
    Re: Condition if string contains a specific character

    Hi @Earthling87,

     

    If you want to determine a string if contains ";", there are two methods of setting for the Condition action, one is use Contains() function, then put the bool value true to the right side:

    contains('This is a string contains ;',';')

    Screenshot 2021-04-16 134410.jpg

     

    The other way is put that string into the left side of Condition action directly, then put the ";" to the right side, and condition select "contains":

    Screenshot 2021-04-16 134457.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.

     

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!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 66 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 65

#3
rzaneti Profile Picture

rzaneti 41 Super User 2025 Season 1

Overall leaderboard
Loading started
Loading started