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 Apps / Query on validating ex...
Power Apps
Answered

Query on validating extracted fields (using Ai builder) into SharePoint list

(0) ShareShare
ReportReport
Posted on by 147

Hello

 

I have created the below which reads invoice attachments sent via email and extracts certain fields such as invoice number etc and stores the data into a SharePoint list. I have tried placing a condition as a test after the "extract info" step (currently not showing) to only update SharePoint if the invoice number was below a certain number but it skips updating SharePoint but doesn't return an error on the flows page. Please can someone advise where i'm going wrong? Apologies if i don't reply as going on a/l returning 10/10.

 

AVFC_0-1695999154721.png

 

Categories:
I have the same question (0)
  • cchannon Profile Picture
    4,702 Moderator on at

    There are lots of reasons why that condition (the invoice number logic) might be returning false when you expect it to be true.

     

    What I normally do when I am debugging something like that is I add a Compose step just before the Condition. I then copy the value I am checking in the Condition and paste it into the Compose. Then I run a test execution of the flow. It will still behave the same way (Compose should change nothing), but now in the flow execution record you will be able to click on the Compose step and inspect the value. This is usually a very helpful first step in debugging.

     

    Give this a try, then let us know if it helps!

  • AVFC Profile Picture
    147 on at

    Thanks for the reply @cchannon 

     

    So i added a compose step (using the Invoice number value from my AI builder) before my 2nd condition as below:

     

    AVFC_0-1697027182251.png

    So i would expect the flow to skip updating my SP list as the invoice number value detected on the email attachment is below 2 mil. Instead i got the below error saying condition 2 has failed. I don't get why it's complaining that my parameter types don't match?

     

    AVFC_1-1697027516513.jpeg

     

  • cchannon Profile Picture
    4,702 Moderator on at

    Yeah, what you're seeing there is just inconsistency from PowerAutomate in how it present data types. It doesn't put quotes around strings so it can be easy to think they are numbers when they aren't. In your compose, try wrapping the input in the function Int() to force Power Automate to read it as a number, then use the output of your Compose as the input in your Condition.

  • AVFC Profile Picture
    147 on at

    Do i use the conversion function for Int as below within my compose? If so how do i place my parameter invoice value from my AI model into that as when i type invoice number value nothing comes up?

     

    AVFC_0-1697034188869.png

     

  • cchannon Profile Picture
    4,702 Moderator on at

    Yes, that's the one. So this is another quirk of Power Automate: the two tabs (Expression and Dynamic Content) give you different capabilities. Expression is where you find functions and operations, but you cannot find variables there. Dynamic Content is where you find variables, but you cannot find functions there. 

     

    So what you do is pick the Int expression, put your cursor inside the parenthesis, then go over to the Dynamic Content tab and insert your variable.

  • AVFC Profile Picture
    147 on at

    Hello

     

    So just tried your suggestion but got the same error with condition 2 as above. 

  • Verified answer
    cchannon Profile Picture
    4,702 Moderator on at

    Did you use the Compose output in Condition 2 instead of Invoice Number?

  • AVFC Profile Picture
    147 on at

    No i didn't (see below) 😬

    AVFC_0-1697126501500.png

    So i should you use the same input in the compose and replace the invoice number value in condition 2. Will give it a try and let you know. Thanks for your continued help 🙂

  • AVFC Profile Picture
    147 on at

    @cchannon Got to say a big thanks for all your help on this and i've now learnt some of the quirks of Power Automate 😉 It's now working as i expected.

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard