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 / Use a condition which ...
Power Automate
Suggested Answer

Use a condition which meets criteria from and AI Model

(0) ShareShare
ReportReport
Posted on by 14
I have an AI model reading a PDF. One of the fields in the PDF is a Customer number.  I want my flow to continue if the customer number does not equal 5277. I have looked at the value as a value, and value as text, but all PDFs are evaluating as True, even 5277. I need some guidance on how to extract the "Customer Number" and apply it to the Condition to make it work.
image (6).png
image (5).png
Categories:
I have the same question (0)
  • trice602 Profile Picture
    16,007 Super User 2026 Season 1 on at
    Hi,
     
    The flow looks good and don't see anything specifically, but I suspect the root cause is not the conditional action but rather the value being scraped in the AI model.  Can you confirm the value in your compose action is 5277 please?  In your screenshot you reference 5276 (typo?)  
     
    So step one, look at the output of your compose and confirm the number or text your want to search for matches the condition.  Also, this will probably also come in as text.  FYI --
     
     

    ------------------------------------------------

     

     

    ⭐ If this was helpful, please like and mark as a verified answer to help others find this too!

     

     

    Always glad to help! 💯💯💯💯💯

     

    Tom

     

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     
     
  • GB-AU Profile Picture
    14 on at
    Thanks for the response. Each document has one specific Customer Number, therefore I want all Customer Numbers to pass as True unless the number is 5276. I sent an email with 2 documents, one with Customer Number 5276 and the other with Customer number 5277, both passed as True. This is the compose output for each: 
     
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "value": "5277",
    "displayName": "Customer Number",
    "fieldType": "string",
    "confidence": 0.995,
    "text": "5277",
     
    and
     
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "value": "5276",
    "displayName": "Customer Number",
    "fieldType": "string",
    "confidence": 0.99,
    "text": "5276",
     
    I'm thinking the Condition is the issue??
     
  • Chriddle Profile Picture
    8,632 Super User 2026 Season 1 on at
    Don't write the value in double quotes since the double quotes are not part of the value.
    They mean, that the value is a string, not a number.
     
    Unfortunately, if you just type 5277 into the condition this will be casted to a number and therfore the condition returns false (a string does not equal a number).
     
    To solve this, either replace the left side of your condition with the expression int(Compose('Compose-Customer_Number')) or replace the right side of your condition with the expression string(5277)
  • Suggested answer
    GB-AU Profile Picture
    14 on at
    Hi Chriddle, unfortunately this did not work. I ended up getting a response from a work college who said to parse JSON the "Customer Number" and add the output of that to the condition and it worked.
     
    thanks again, GB
  • trice602 Profile Picture
    16,007 Super User 2026 Season 1 on at
    Hey there!
     
    I am following up on this post use a condition which meets criteria from and ai model in this category building flows from 12/12/2024.  I know the post is a little older, but it is a common question here so wanted to take a moment and follow-up. I see there have been 4 replies and 0 likes and asking if your question has been answered.  If so, please help the community out by completing one or more of the following actions!  Thanks in advance!
     
    Easy as 1-2-3 ‼️💯⭐😎🆒🙏
     
    1) Mark a reply as a verified answer - this is essential, and it helps others with the same general question find this thread. ✅
    2) You can also mark one of more replies as a verified answer.  Please take a moment and give the author credit for volunteering their time. ✌️
    3) Like one or more replies.  Kudos always greatly appreciated! 👍
     
    Pro tip:  if you found your own solution or workaround, feel free to add a reply to your own post and mark it as the solution too!  The goal is to get this thread marked with a verified answer by anyone that finds one or more replies helpful!
     
    Again, thanks in advance for reading and responding, always glad to help!  Tom 💯💯💯💯💯
  • trice602 Profile Picture
    16,007 Super User 2026 Season 1 on at
    If I can help with anything else please let me know or tag me in a future post, I enjoy reading and answering questions.  Always glad to help!  Tom 💯💯💯💯💯

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard