web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How do I configure a F...
Power Apps
Answered

How do I configure a Form to use two DataSources?

(0) ShareShare
ReportReport
Posted on by 40

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?

Categories:
I have the same question (0)
  • Verified answer
    v-yamao-msft Profile Picture
    Microsoft Employee on at

    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

  • dbarrett Profile Picture
    40 on at

    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.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 528

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard