Skip to main content

Notifications

Community site session details
Power Apps - AI Builder
Answered

Create an application using receipt processing

Like (0) ShareShare
ReportReport
Posted on 10 Mar 2022 00:10:08 by 26

hello

 

I am somewhat new to power apps, but not to 365.

 

I am trying to create an application with which I can take a photo of a ticket and that this photo is stored in a library and its table in a sharepoint list.

To achieve this I see two options.

 

1 option. this option follow this thread
https://www.c-sharpcorner.com/article/receipt-processing-using-ai-builder-in-power-apps/

I have a problem in Step 4, when I want to enter the code in the "OnChange" section I get an error in each ";"

I don't understand why the code doesn't accept me.

tt.PNG

 I don't understand why this happens to me.

 

2 option. following a link from microsoft.

In this case I don't know how to create a button to save this information in my library and sharepoint list. I imagine that with some flow and capturing the information, but I can't continue with this option either.
ppblab77_1-1646870694897.png

I would greatly appreciate the help.

 

I intend to save the image in this library with these extra columns and the table in a list (creating one record per line of the table).

library structure

ppblab77_0-1646927485695.png

list structure

ppblab77_1-1646927559998.png

 

Categories:
  • JoeF-MSFT Profile Picture
    on 12 Mar 2022 at 15:21:46
    Re: Create an application using receipt processing

    Congratulations @ppblab77! And thanks for sharing the steps you followed. When we go for that coffee โ˜•, we'll be able to use your app to do expense reporting. ๐Ÿ˜Š

     

    You know where to finds us in this forum if you have any additional AI Builder question.

  • ppblab77 Profile Picture
    26 on 12 Mar 2022 at 01:33:05
    Re: Create an application using receipt processing

    using ";;" It is the solution to my problems

    .

     

    Thanks @JoeF-MSFT !!! ๐Ÿ˜๐Ÿ˜‰

  • ppblab77 Profile Picture
    26 on 11 Mar 2022 at 19:24:44
    Re: Create an application using receipt processing

    hello again friend.

     

    Finally managed to insert the ticket table in another separate list.

     

    I introduce the purchased items table in a variable with json. Then I add this to the button call and then to the flow. compose -> parse json -> apply to each in outputs -> create item

     

    I had to use two buttons. 1 for the variable and 2 for the flow call, I still have very strange errors when joining several formulas.

    I don't understand what problem my power apps has with ";" and ","

     

    so if it works

     

    button 1

    ppblab77_0-1647026372767.png

    button 2 

    ppblab77_1-1647026433439.png

     

    It does not work like this

     

    in various formats the formula

    ppblab77_2-1647026559255.png

    ppblab77_3-1647026612241.png

    neither using : nor .

     

    I don't know what the problem will be. We keep working ๐Ÿ˜

     

  • ppblab77 Profile Picture
    26 on 11 Mar 2022 at 17:16:34
    Re: Create an application using receipt processing

    hello friend, this really helped me!

     

    I am very grateful to you, my progress has been very remarkable, thanks to your personalized comment.

     

    I have already managed to add the analyzed images to my library.

     

    ppblab77_0-1647018126197.png

     

    @JoeF-MSFT Allow me one more question. I would also like to capture the table and this in turn create an element for each line of the table in a sharepoint list.

     

    List

    ppblab77_1-1647018442284.png

    (I usually match the items in the list with the file id of the library)

    app

    ppblab77_2-1647018526488.png

     

    ----

    As a curious fact, in my code I must put ";" where you put ","... I don't understand why, it must be the language or something.

     

    I repeat, thanks for the help, I owe you a coffee ๐Ÿ˜Š

     

  • Verified answer
    JoeF-MSFT Profile Picture
    on 10 Mar 2022 at 23:29:07
    Re: Create an application using receipt processing

    Hi @ppblab77  - welcome to Power Apps! ๐Ÿ™‚

     

    @RezaDorrani  has this great video that explains how to build an expense reporting app including the AI Builder Receipt Processing module: PowerApps Expense Reporting with Receipt Scanning AI - YouTube

     

    A possible approach to your use case is indeed by calling a flow from your app that can upload the receipt along the extracted data.

     

    1. Here is how your flow should look:

     

    JoeFMSFT_0-1646954731523.png


    A few things to mention:

     

    For each field you want to send from the Power App, select the following option in the flow: Ask in PowerApps

     

    JoeFMSFT_1-1646954749598.png

     

     

    For the file name in the SharePoint Create file action, I used the following expression: 

     

     

    concat(utcNow(),'.jpg')

     


    And for the File content the following expression. Note, first I wrote the expression dataUriToBinary() and then I switched to the Dynamics content menu to select 'Ask in PowerApps' to have triggerBody()['Createfile_FileContent']

     

     

    dataUriToBinary(triggerBody()['Createfile_FileContent'])

     


    2. Once the Power Automate flow is ready, go back to the app, select the button that you inserted and go to the Action menu > Power Automate > and select the flow you created. 

     

    JoeFMSFT_2-1646954819826.png

     

     

    3. Complete the formula so you send all the info to the flow. Make sure you are adding this on the OnSelect property of the button you have added to your app. 

     

    JoeFMSFT_3-1646954855437.png


    4. Run the app, upload a Receipt, select the save button and the information will be sent to the flow that will save all the information to SharePoint!

     

    JoeFMSFT_4-1646954895928.png


    I hope this helps! โ˜•๐Ÿบ

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz โ€“ Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Communityโ€ฆ

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,079 Most Valuable Professional

Leaderboard
Loading started
Loading started