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 Automate
Answered

Substring

(0) ShareShare
ReportReport
Posted on by 157

Hi! I have a flow where I have to substring a specific data from the file name also have a master list of data the compares who employee that has this employee number. My concern is that my condition always result to false, I'm trying to equal it on the substring that I did. Your response is highly appreciated, Thank you!

substring.png
condition.png
Categories:
  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @mj07 

    According to your screenshot , you have got the substring in Outputs . You want to compare tis substring with employee that has this employee number. 

    First you need to check the Data type is the same like String for the compare fields.

    You can use the string() to convert number to string.

    And you can share the condition in your side how you compare this field in your side:

    vyueyunmsft_0-1699853229496.png

    As you can see this is my test flow:

    vyueyunmsft_1-1699853616399.png

     

     

     

    Best Regards,

    Yueyun Zhang

     

  • mj07 Profile Picture
    157 on at

    Hi @v-yueyun-msft, thanks for your reply. My employee number in SharePoint is Single line of text. I try to hardcode my employee number compare to substring, still expression result is false

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @mj07 

    Thanks for your quick response ! According to your screenshot, I can only see that your COndition judgment is false, and I can't see the reason, can you give me some more detailed flow configuration, so that I can help you better?
    The main thing is how did you get your sources of comparison?

    And what is the data in your SharePoint, can you give me some example data?

     

    Best Regards,

    Yueyun Zhang

  • mj07 Profile Picture
    157 on at

    mj07_0-1699853885374.pngmj07_1-1699853909434.pngmj07_2-1699853922864.png


    Hi! So this is my flow currently(sorry for the mess, I'm just trying to work things out). First I'll get all the file properties that needs to be extracted(The sample file is the 3rd pic). Then I will get the 8 digit employee number then the Get Items is the SharePoint list I made to match the extracted Employee Number to my SharePoint list.  I hope its clear

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi, @mj07 

    Thanks for your quick response ! According to your screenshot , you are using the Apply to each2 :

    vyueyunmsft_0-1699854349184.png

    The value seems to the "Gat Items" value in your side .And you get the [Personal Na..] to compare with the [SubString].

     

    First you need to check if the "Get Items" action return the correct result in your side , and you need to check the  [Personal Na..] is what the value?:

    vyueyunmsft_1-1699854470759.png

     

    Then you can also add two compose action here :

    vyueyunmsft_2-1699854533086.png

    So that you can put this two value in the compose action to check why this condition always return false.

    And you can also check if the condition return true:

    vyueyunmsft_3-1699854595639.png

     

    Best Regards,

    Yueyun Zhang

     

     

  • mj07 Profile Picture
    157 on at

    Hi! So this i the result i got. On the first compose, I got the right personnel number but wrong employee name and on the second compose i got the personnel number but its from the different employee. Sorry what is the hierarchy of the flow, sorry I'm getting confuse on this outputs.

    mj07_0-1699861691941.png

    mj07_1-1699861704179.png

     

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @mj07 

    According to your screenshot , the number is different from the compose and compose 2:

    vyueyunmsft_0-1699862134155.png

    So in this case , the condition go to the false is the normal situation.

     

     

     

    If I misunderstand what you mean, you can describe your needs and your expected outcomes in detail so that we can better help you.


    Best Regards,

    Yueyun Zhang

     

     

  • mj07 Profile Picture
    157 on at

    Hi, compose 1 is from the file name and compose 2 is from the SharePoint list master data. I want to compare compose 1 substring to this SharePoint list data and from there i could get its employee name

     

    mj07_0-1699862487929.png

     

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @mj07 

    Yes, for your flow , there is no issue for the substring action due to it returns the correct string .

    I think you just need to check the [Personal N...] is the right field you need in your SharePoint . For your screenshot , the column name is [Employee Number], why you put the  [Personal N...]  here?

    And what is the value in your "Apply to each2" , dose it "Get items-value"?

    vyueyunmsft_0-1699862874994.png

     

     

     

    If I misunderstand what you mean, you can describe your needs and your expected outcomes in detail so that we can better help you.


    Best Regards,

    Yueyun Zhang

     

     

  • mj07 Profile Picture
    157 on at

    Hello, sorry for the confusion. Employee Number and Personnel number are the same data type and data, I'm just trying different field name if it works. For apply each the value is from Get items

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 317 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 247

#3
Henil Profile Picture

Henil 117

Last 30 days Overall leaderboard