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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Use a condition which ...
Power Automate
Unanswered

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.
Categories:
I have the same question (0)
  • trice602 Profile Picture
    15,332 Super User 2025 Season 2 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,422 Super User 2025 Season 2 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
    15,332 Super User 2025 Season 2 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
    15,332 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 463 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 427 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard