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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / AI-builder - get extra...
Power Apps
Unanswered

AI-builder - get extracted item on separate rows

(0) ShareShare
ReportReport
Posted on by 8

I want to extract line item data from invoices and save these in a sharepoint-list. I've begun by setting up a primitive flow that does this, but I'm encountering some challenges.

For the supplier used for testing, their invoices consist of several pages. I'm trying to work around the problem of AI-Builder only scanning the first page (apparently it's not possible to tag multiple similar data fields across multiple pages) by splitting the PDF's and training AI-Builder on these separate pages.


What happens though, as illustrated in my attachment, is that the output doesn't come out line by line. I want Ref-01 on one row, Ref-02 on another etc. Also, since the pages are split, data is spread out over different rows. For example, the first cost on the second row belong to Ref-02 in the first post, but maybe I'll have to sort that out in PA.


(Another problem is that AI-Builder is not reading the content properly on the 3rd post but maybe that calso can be taken care of in PA).


Any advice would be appreciated!

p.s. The output in this case is the result of two invoices, indicated by the Event Date-field

Attachment2.png
attachment1.PNG
Categories:
I have the same question (0)
  • CedrickB Profile Picture
    Microsoft Employee on at

    Hi,

    First of all extracting tables spaning accross pages should be working presuming you are using the "This table continues on next page" feature. See https://learn.microsoft.com/ai-builder/tag-form-processing-model#multipage-tables

    Make sure to provide samples with 1, 2 and 3 pages (2 sample of each one)

     

    Regarding empty rows for some cell.

    You should record data in an object variable.

    {"Col1":"MyValue1", "Col2":"MyValue2", ..., "Coln":"MyValueN"}

    Inside the Apply to each, check if Col1 is empty,

    - If so , just append Col3 to "Col3" property

    - If not, your previous row is complete. You can consume it and create a new object for current row.

  • reichkupong Profile Picture
    8 on at

    Hi Cedric, thank you for your reply!
    I will try your advice concerning the empty rows.

    Regarding the "This table continues on next page"-function. This only works when the desired fields are in an actual table right? On the invoices I'm using for testing, only some fields are inside a table.

  • reichkupong Profile Picture
    8 on at

    I'm struggling with understanding how to proceed with the object variable. I'm not permitted to initialize a variable inside the Apply for each.

  • CedrickB Profile Picture
    Microsoft Employee on at

    Initialize the variable at the beginning of you flow.

    Then use "Set variable" inside the "Apply to each".

     

    And to your earlier question, yes "continue on next page" only works when the desired fields are in the table.

  • reichkupong Profile Picture
    8 on at

    I see. Ok, I initialized the variable at the beginning.
    However, I still get the first items lumped together (ref01 & ref02 for example from my sharepoint screenshot). I need to separate these.

  • CedrickB Profile Picture
    Microsoft Employee on at

    Ah ok, I didn't get this at the beginning.
    In this case, you probably better to try this:

    Condition split(Reference, ' ')[0]    Equals  Reference  

    THEN // There is only one information in the column

      consume 

           Reference

           Supplier

           Event date

           Unit status

           Unit number

           Cost

           ID

    ELSE 

      Apply to Each split(MYCOL, ' ')

      consume

           split(Reference, ' ')[loopid]

           Supplier

           Event date

           split(Unit status, ' ')[loopid]

           split(Unit number, ' ')[loopid]

           split(Cost, ' ')[loopid]

           ID

  • reichkupong Profile Picture
    8 on at

    Thank you for all your support.
    Unfortunately I don't have the know-how to translate your recommendations into PA-actions.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard