web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / To check if list doesn...
Power Automate
Answered

To check if list doesn't start with specific text values

(0) ShareShare
ReportReport
Posted on by 43

Hello 

I have a list containing only one row sometimes two rows . What i want is to check if list doesn't start with these specific text values (Commerce/DC4Router)  then i need to perform some actions 

Till now this i have tried but it doesn't work as this condition works when list start with Commerce/DC4Router values 

ayush1tyagi_0-1695302907156.png

Thanks 

I have the same question (0)
  • eetuRobo Profile Picture
    4,558 Super User 2026 Season 1 on at

    Now your flow will only check first item in the list. If it sometimes has two you should go through it with For each loop.
    Also the If checks if the List item starts with 'Commerce OR DC4Router' -text. So it checks if the text also has OR in it.
    Correct syntax I think would be: %'Commerce' OR 'DC4Router'% but I think it doesn't let you do OR statement with text value.
    So I recommend just doing
    If starts with Commerce
    Else if starts with DC4Router

    eetuRobo_0-1695305572833.png

     



  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    The correct way to do this is using a statement like this:

    Agnius_0-1695306316507.png

     

    The syntax in the IF statement looks like this:

    Agnius_1-1695306342036.png

     

    What's important here is as follows:

    • You must define each condition around the OR operand separately. So, on both sides of the operand, I check if %List[0]% does not start with a certain string.
    • In order to be able to use the OR operand, you must use the special expressions as show below. NotStartsWith() is the expression for checking if a value does not start with another value. There are three parameters for the NotStartsWith() expression:
      • The target value (%List[0]% in your case)
      • The value to check for (the strings you are looking for)
      • A boolean value to indicate whether the check should be case sensitive or not. False indicates case sensitive (i.e. "Ignore case" = False)
      • You must put %True% as a boolean in the second operand to check if the first operand returns true.

    Here's a snippet of the entire code for you to copy and paste into your flow designer to get the actions generated:

    IF (NotStartsWith(List[0], 'Commerce', False) OR NotStartsWith(List[0], 'DC4Router', False)) = True THEN
     EXIT FUNCTION
    END
    

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • ayush1tyagi Profile Picture
    43 on at

    Both provided solution are not working the list runs the condition each time whenever it get populated 

     

     

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @ayush1tyagi 

     

    I noted that you have said it is list of rows, so you want to check whether the list starts with specific word , in other words you want to check whether the list first row first column starts with a text , Hope i am right 

     

    If that is the case, then try the below expression 

    Nived_Nambiar_0-1695312129714.png

     

    Here List[0] represent first row, then List[0][0] represent first column of first row which we want to check whether it starts with specific word or not 🙂

     

    Hope it helps !

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • ayush1tyagi Profile Picture
    43 on at

    No success still whenever the list gets populated the conditions are satisfied each time 

     

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @ayush1tyagi 

     

    I did not get what you said  Also could you show how the list looks like ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    I don’t think the OR is working right. 

    nest them

     

    if doesn’t start with commerce

        If doesn’t start with dc4 router

           â€˜Do something

        End (if)

    end (if)

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    @Nived_Nambiar 's suggestion is a good idea if your list is not really a list, but instead a data table with columns. It's just missing some parameters in the statement.

     

    It could be done like this:

    Agnius_0-1695357637849.png

    Or, if you reverse this to use StartsWith() then you need to put in %False% in the second operand.

     

    It's a bit hard to understand what it is that you are trying to achieve here, without really seeing some sample screenshots of your flow and your data. It would be great if you could show us what the values of the list look like during runtime.

     

    @MichaelAnnis , it can definitely be done with an OR statement and there is no need to build nested Ifs. It just needs to be done right based on the underlying data.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • ayush1tyagi Profile Picture
    43 on at

    I have found a workaround in my flow for now will circle back to this logic of list if that doesn't work in future 

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Feel free to share your workaround and accept it as a solution, so the topic is closed and others can also find it, if they have a similar issue.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 481

#2
11manish Profile Picture

11manish 278

#3
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

Last 30 days Overall leaderboard