cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bayan
Regular Visitor

Create a record in Dataverse table using canvas screen data

Hi Everyone 

Below values are added by me to canvas screen and doesn't belong to any table in dataverse (its not also a form). I need to store this data upon button click in a a table I have already created called "Orders" and it contains columns: ID, Total Price, Address, Note and No cutlery.

So is there any function can be used to take this data, create a new record in that table and store the data in based on customized mapping between the labels and columns ? 

Thanks in advance

 

Bayan_0-1644823630050.png

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hello @Bayan  With Default(Orders) we can create a new record instead of that we can use First() Function to match condition data that you want to update

View solution in original post

It worked perfectly dear ! Thanks a lot 😀

View solution in original post

4 REPLIES 4
kanchankolekar
Helper I
Helper I

Hello @Bayan 

You can create a new record in the table by using Patch() and SubmitForm(). If you are using form then you can use a SubmitForm(FormName) to store records in the table. On another hand, if you are using different controls to add a value to the table you can use Patch(Orders, Default(Orders),{ID: Textinput.Text, TotalPrice: Textinput.Text}) In this way.

Hope this is helpful for you 

Thank you

 

@kanchankolekar Hi 
Thank u for your reply. but is not Default(Orders) is used on update record? I mean the documentation syntax says: Default(DataSource), while order table here is not the source of this data. am I wrong ?

Hello @Bayan  With Default(Orders) we can create a new record instead of that we can use First() Function to match condition data that you want to update

It worked perfectly dear ! Thanks a lot 😀

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,883)