cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dbarrett
Level: Powered On

How do I configure a Form to use two DataSources?

Hi all,

 

How do I configure a Form to use two DataSources? This is needed to support a Gallery item where two DataSources have been used.

 

For my Gallery.Items (which works) I've used AddColumns to add an additional column. The formula is as follows:

SortByColumns(Search(AddColumns(Record, "StudentID",LookUp(IncUniformRecordCache, RecordID=Record[@RecordID], StudentID)), TextSearchBox1.Text, "StudentID"), "Created",Descending)

 

When clicking on a Gallery item to view details, Form.Item on the detail screen points to Gallery.Selected. As there's an additional column being passed from Gallery, the Form returns the error "Expected a value compatible with DataSource". I'm assuming this happens because the Form doesn't know about the foreign column as the Form is only using the one DataSource ('Record' in my example).

 

I've tried adjusting Form.Item to use AddColumns like what was done for the Gallery, but it seems Forms don't support columns from more than one DataSource.

 

Is there a way or do I need to stop using Forms for multiple DataSource scenarios?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: How do I configure a Form to use two DataSources?

Hi dbarrett,

 

Thanks for your feedback. I tried to use AddColumns function on the Gallery to add a column to a table. It works fine on the gallery. While when I navigated from the gallery to the Display form or Edit form, I got the same error message with you “Invalid formula. Expected a value compatible with Data Source”.

 

From this documentation we know that Display form is used to display many or all fields for a single record, Edit form is used to update one or more fields for a single record, and this record is what you selected from the gallery. While seems that form is not able to detect the newly added column as it is not actually in the data source. So I am afraid that your scenario might not be possible.

 

Reference material:
https://powerapps.microsoft.com/en-us/tutorials/working-with-forms/

 

Best regards,
Mabel Mao

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

Re: How do I configure a Form to use two DataSources?

Hi dbarrett,

 

Thanks for your feedback. I tried to use AddColumns function on the Gallery to add a column to a table. It works fine on the gallery. While when I navigated from the gallery to the Display form or Edit form, I got the same error message with you “Invalid formula. Expected a value compatible with Data Source”.

 

From this documentation we know that Display form is used to display many or all fields for a single record, Edit form is used to update one or more fields for a single record, and this record is what you selected from the gallery. While seems that form is not able to detect the newly added column as it is not actually in the data source. So I am afraid that your scenario might not be possible.

 

Reference material:
https://powerapps.microsoft.com/en-us/tutorials/working-with-forms/

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
dbarrett
Level: Powered On

Re: How do I configure a Form to use two DataSources?

Thank you Mabel,

 

I'm two weeks' new to PowerApps and am still finding my feet. It's powerful but "quirky", and I'm struggling with the lack of examples to back the documentation. This community however provides an excellent resource.

 

I have briefly experimented with replacing forms with galleries and while this could work for record edits in a multiple data source scenario, in the case where you have a browse gallery and click on an item to edit, it didn't feel right presenting that item in a gallery. From my understanding, a gallery is designed for working with tables of items and not individual items like in the case of forms.

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 287 members 5,128 guests
Please welcome our newest community members: