Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Freight extract from Invoice sometimes extracted correctly but sometimes only as Text

(0) ShareShare
ReportReport
Posted on by 6

Hi, 

I am currently building a flow to extract data from Invoices and paste the selected tags into an excel table. My issue is that the freight value is sometimes extracted correctly and has the FreightValue variable filled in correctly but sometimes it is not extracted correctly and has only the FreightText variable filled in. This disrupts the whole flow. Anyone knows why this happens?

Thanks in advance, 

Nick

  • Nicholas87 Profile Picture
    Nicholas87 6 on at
    Re: Freight extract from Invoice sometimes extracted correctly but sometimes only as Text

    Hi, 

    Thanks for the tip.

    Actually, it is a bit too late for me to check if it is numeric or not as I need the AI to generate it as numeric in the first place. Else it would not work. 

    Below is an example of 2 results that have been processed through the flow: 

    Nicholas87_0-1712646711545.png

    In the first row, you can see that the flow has generated a freight value from the invoice and successfully pasted it in the excel worksheet. In the second row, the freight value has not been generated and so was not pasted in excel causing the whole row to lose functionality. Both invoices have the same format.

    Below are the results from the AI extract in the flow for both invoices: 

    Nicholas87_1-1712646986717.png

    As you can see above there is not freight value in the results. 

    The below is an example of a correct one: 

    Nicholas87_2-1712647073401.png

    The above shows the Freight value. This is my issue. Sometimes the flow generates that freight value and sometimes it doesn't. I hope I explained myself a bit better. Appreciate if you could help me. 

    Thanks,

    Nick

     

  • ManishSolanki Profile Picture
    ManishSolanki 15,075 on at
    Re: Freight extract from Invoice sometimes extracted correctly but sometimes only as Text

    You can use an expression to verify if value is numeric or not with the help of isInt or isFloat (for decimal number) function. Here is a sample:

    ManishSolanki_0-1712577688147.png

    if(isInt('123'),'123','')

     

    Output:

    ManishSolanki_1-1712577726241.png

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

  • Nicholas87 Profile Picture
    Nicholas87 6 on at
    Re: Freight extract from Invoice sometimes extracted correctly but sometimes only as Text

    Hi, 

    I did and sometimes the field is filled in with the correct value. Unfortunately, not always though. sometimes the model only extracts the Freight as text. This means that there is no value for freight to fill in which fails the flow. Any idea why this happens please?

  • ManishSolanki Profile Picture
    ManishSolanki 15,075 on at
    Re: Freight extract from Invoice sometimes extracted correctly but sometimes only as Text

    Hi Nick,

     

    Thanks for sharing. Did you verify if value return from AI builder action is correct? If not, then you need to train the AI model to handle those case. 

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

  • Nicholas87 Profile Picture
    Nicholas87 6 on at
    Re: Freight extract from Invoice sometimes extracted correctly but sometimes only as Text

    Hi, 

    Please find the screenshots of the flow. First is the onedrive trigger of when a file is saved in a folder. Then there is the execution of the AI extract of the invoice where we get the value out of the invoice and into the variables. The apply to each loop is where the variables are fed, formatted and composed into the excel file.

    Nicholas87_0-1712574596851.pngNicholas87_1-1712574623500.pngNicholas87_2-1712574682445.pngNicholas87_3-1712574734826.pngNicholas87_4-1712574784903.png

    Nicholas87_5-1712574818074.png

     

     

  • ManishSolanki Profile Picture
    ManishSolanki 15,075 on at
    Re: Freight extract from Invoice sometimes extracted correctly but sometimes only as Text

    Hi Nick,

     

    Could you please share the screenshot(s) of the flow in edit mode?

     

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard