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 / Extracting specific in...
Power Automate
Unanswered

Extracting specific information from invoices

(0) ShareShare
ReportReport
Posted on by

Ok so I think I understand how the template for extracting information from invoices works. The problem for me is I want specific lines and their totals. I'm trying to isolate extraneous charges and just looking at the base charges. In this specific example I want the time and distance by itself, the base rate. 

dandanattack_1-1649788678709.png

If you look at the receipt it has two lines of "Time & Distance" and I want those added up and then create a "line" in SharePoint. I created an AI that extracts a majority of the information I need. Subtotal and Total included. 

dandanattack_2-1649788867964.png

The problem is that Time & Distance is dynamic and there can be more than one entry on the receipt based on the pricing structure of the company. I've got my AI builder to get the information as seen below but now I want to extract just the Time and Distance, sum it to get the total Time and Distance and then subtract it from the SUBTOTAL to get the base rate. 

dandanattack_3-1649789002585.png

Above are the current items I have extracted from my AI builder. 

Below you'll see what I'm trying to do. I'm trying to extract the base rate (time and distance) so I can subtract it from the SUBTOTAL so I can isolate and report the extraneous charges.

 

dandanattack_4-1649789186984.png

Any help would be greatly appreciated. 

 

Thanks!

 

Daniel

Categories:
I have the same question (0)
  • MelissaReed Profile Picture
    292 on at

    It looks like you want AI to detect all occurrences of  "TIME AND DISTANCE" in the charge detail and add those up.

    And it looks like all the variables you've defined are string fields.   

    If you're trying to glean off and sum the amounts for detail lines where one or more has Description "TIME AND DISTANCE", you will need to define a new variable of type Table, and provide column names of Description, Quantity, Period, Rate, Amount.   (These will all be captured as strings, even Amount -- we'll deal with that shortly.)

     

    Once you've defined the table as a variable, then Next to your Collections and  select the Charge Detail table on each form in your collection(s). 

    a.  circle the whole table, excluding headings and total line

    b.  mouseclick to identify each row

    c.  Mark off columns by ctl-leftclick

    d.  You'll be left with column headers labeled A, B, C....   click each header and choose the appropriate name from the popup list of column headers that will appear.  

     

    This will require a little more work on your Flow end.

    Let's say you named your AI table "Charge Details",  In your flow, the value you're looking for is from the AI return set is Charge Details Entries.

    And another helpful hint,  unlike referencing Sharepoint return sets, you don't reference AI tables as "item()?['ColumName'].  You'll need to reference them using the "friendly" name they give you in the Variables list.  So if you were looking for Amount in the table "Charge Details" you would be looking for the variable called "Charge Details Amount value"  to use in assignments like in Select actions.

     

    Once you've Select'd the table from the AI return data,  it can be handled/ref'd like any other array.

    So once you've taken the Table, done a Select to pull the columns you want, you can then to a Filter Array where Description = "TIME AND DISTANCE"

     

    I wish I could include some screencaps to illustrate but my Cloud Flow editor has suddenly gone wonky.  Locks up action blocks with a red exclamation point when I try to select a variable to apply.  Grrf!

    Hope this helps.   Working with AI Forms Builder is a steep learning curve esp dealing with the return result set, but once you get your bearings on that it does get easier and less overwhelming.  Hang in there!

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard