cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gioce 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
Community Support
Community Support

Re: form and datasource

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
eka24 Community Champion
Community Champion

Re: form and datasource

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.

gioce Helper II
Helper II

Re: form and 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?
eka24 Community Champion
Community Champion

Re: form and datasource

Please give a screenshot to make it more clearer

Super User
Super User

Re: form and datasource

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

Re: form and datasource

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.
gioce Helper II
Helper II

Re: form and datasource

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

Re: form and datasource

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (7,327)