cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

form and datasource

hi, if I have to manage a form in edit mode, which must have fields taken from two tables (a and b), how do I insert them in datasource?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @gioce ,

Yeah, if you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

 

If this feature is released within PowerApps, I would also reply here.

 

If the alternative solution I provided above could help your scenario, please also consider go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
Super User III
Super User III

For EditForm, insert a button, and OnSelect of the button put:
  EditForm(YourFormName)

After clicking the button, it will turn your form into edit mode. You can then go ahead to edit the data after which you can click your submit button to send the data into your datasource.

thanks, but perhaps I have not been very clear. In my form, I have fields that come from two data tables. how do I insert these two tables into the datosource parameter?

Please give a screenshot to make it more clearer

Super User III
Super User III

Hi @gioce 

Forms are designed to work with a single data source, so it isn't possible to update multiple data sources using a single form.

One technique that you can use is to add 2 edit forms onto your screen, and to set Form1 to table a, and Form2 to table b.

In your save button, you can submit both forms at the same time.

SubmitForm(Form1);
SubmitForm(Form2)

If you can work out a way to lay out your forms and controls, the user may not even notice that there are 2 forms on your screen.

Another alternative is not to use forms, but to manually save your data to both data sources using the Patch function.

https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-patch 

Community Support
Community Support

Hi @gioce ,

Do you want to merge fields from multiple data sources into single one Edit form?

 

If you want to merge fields from multiple data sources into single one Edit form, I afraid that there is no way to achieve your needs in PowerApps currently.

 

Currently, within PowerApps, a Edit form could only be connected to single one data source, it could not be connected to multiple data sources.

 

As an alternative solution, you could consider add two Edit forms control in your Edit screen (one for TableA, another one for TableB). Connect the two Edit forms to individual data source. When you want to make the two Edit forms in Edit mode, you could set the OnSelect property of the "Edit" button to following:

EditForm(Form1);
EditForm(Form2)

then bind the Item property of the Form1 to proper record in your TableA, bind the Item property of the Form2 to proper record in your TableB.

When you submit the two Forms' data back to corresponding data source, please set the OnSelect property of the "Submit" button to following:

SubmitForm(Form1);
SubmitForm(Form2)

 

In addition, you could also consider move these fields from your Table B into Table A, then you just need to add TableA data source into your app, then bind the TableA to the single one Edit form.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

thank you, your solution is the one I have already undertaken. We hope to have this feature on powerapps in the future. Good day

Hi @gioce ,

Yeah, if you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

 

If this feature is released within PowerApps, I would also reply here.

 

If the alternative solution I provided above could help your scenario, please also consider go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (61,594)