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 Apps / Create a row in a Data...
Power Apps
Unanswered

Create a row in a Dataverse table importing data from Power Apps

(0) ShareShare
ReportReport
Posted on by 71

Hi, 

 

I have created two tables in Dataverse: Visitors and Visits. I've created an app with Power Apps from Visitors table so, by default, in that app there's a search box, a list of visitors that match the search and a form with selected visitor details with the option of modify, delete or create a new one.

 

What I need now is to create the feature of register a visit for the selected visitor. I've created a PenInput for the signature (which have to be saved at the Visits record) and a "Check-in" button to register the visit. I was trying to create a Power Automate Flow to create the new record for Visits table but I can't find the way to pass the needed variables to the flow (visitor id and signature). I'm using PowerAppsbutton.Run(Form1.LastSubmit, PenInput1.Image) at the onSelect of "Check-in" button but it says that Run() does not admit parameters 

 

Any help on this please?

Thanks a lot! 
Miguel Gisbert

I have the same question (0)
  • Jonathan Manrique Profile Picture
    2,687 on at

    Hi @mgisbert 

     

    Hello, you must place in the input parameters the data that you need to bring from Power Apps as I show in the image

     

    Jmanriquerios_0-1699284243807.pngJmanriquerios_1-1699284322889.png

    Now in the case of the image you should possibly use Json

     

    Jmanriquerios_2-1699284427842.png

     

     

    Jmanriquerios_3-1699284450786.png

    If I have answered your question, please mark your post as Solved.

    If you like my response, please give it a Thumbs Up.

    You can accept more than one post as a solution

     

  • mgisbert Profile Picture
    71 on at

    Thanks for the answer @Jmanriquerios but I don't have any option to selecte the data I want to bring from Power Apps. If I put the Initialize Variable action at Power Automate I can only see that Body object

  • Jonathan Manrique Profile Picture
    2,687 on at

    Hi @mgisbert 

    If you look at my previous image I wrote visitor, you can also write image, then in Power Apps when you call the flow you must pass those two parameters. And then where it says body instead of body you will get the name of the parameters

     

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    You can accept more than one post as a solution

  • mgisbert Profile Picture
    71 on at

    Thanks a lot @Jmanriquerios. I did that as you can see in the screenshot and I suppose I have everything ok now at Power Automate flow but I don't know how to link now that flow with the button and how to send the signature image from the power app to the flow. 

     

    Thanks! 

     

    Screenshot from 2023-11-07 10-20-07.pngScreenshot from 2023-11-07 10-14-11.png

  • Jonathan Manrique Profile Picture
    2,687 on at

    Hi @mgisbert 

     

    Check, you have only created one input parameter in the flow. You must create the two parameters as I show you in the image I sent you previously (Visitor)

    After them you can use those two parameters where appropriate. For example in add row you can use the visitor parameter, now if you want to use the image, first you must have an image field in the table, then there is a dataverse action which is to load image and there you can use the other parameter.

    At the Power Apps level, it is fine where you are using the formula, it is just wrong because the flow only expects one parameter and you are sending it two. When you are writing the formula, be guided by the intelligence that helps you write the parameters in the order you want go

     

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    You can accept more than one post as a solution

  • mgisbert Profile Picture
    71 on at

    Hi @Jmanriquerios, thank you very much for your help. I set another variable and I still have the error at Power Apps button. Actually it says that the expected number of parameters is 0. Anyway, this is not going to work as I need because I don't have to send a text parameter as Visitor, I need to link that visit with a visitor, that is, to link the new record I want to create in Visits table with a record on Visitors table. And, in addition to that, save the signature img introduced at the PenInput on the signature field of the new record at Visitis table. 

     

    Thanks a lot!

     

    Screenshot from 2023-11-08 09-51-10.png

     

    Screenshot from 2023-11-08 09-51-44.png

     

    In addition, if I remove the two parameters and set the button onSelect as PowerAppsbutton.Run()

    I receive this error when clicking the button: 

    PowerAppsbutton.Run failed: { "error": { "code": "TriggerInputSchemaMismatch", "message": "The input body for trigger 'manual' of type 'Request' did not match its schema definition. The input body is missing required schema properties. " } }

  • Verified answer
    mgisbert Profile Picture
    71 on at

    I'll answer myself. I found out that is not necessary a Power Automate flow for this. Just the Patch() function will create a new register on the table: 

    Patch('VA | Visits', Defaults('VA | Visits'),{Signature:PenInput1.Image, Visitor:Form1.LastSubmit, Date:Today(), Time_in:Now()})

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 802 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 332 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 273

Last 30 days Overall leaderboard