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
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:
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:
As you can see above there is not freight value in the results.
The below is an example of a correct one:
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
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:
if(isInt('123'),'123','')
Output:
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
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?
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.
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.
Hi Nick,
Could you please share the screenshot(s) of the flow in edit mode?