Skip to main content
Community site session details
Power Apps - Building Power Apps
Answered

Invalid Formula. Expected a value compatible with 'DataSource'

Like (6) ShareShare
ReportReport
Posted on 10 Jun 2020 07:54:38 by

I am facing an error when I try to build an Edit Form based on my Gallery selection, based on the SharePoint List "Opportunities and Risk".

 

In my gallery, named "BrowseGallery1", I have the following script in the "Items" field:

 

Filter('Opportunities and Risk', 'Entry Type'.Value = Label2.Text)

 

I configured by Edit Form, labelled "Form 1" Datasource:

 

'Opportunities and Risk'

 

And the Item field:

 

BrowseGallery1.Selected

 

However, I am getting error "Invalid Formula. Expected a value compatible with 'DataSource'". I believe I am already pointing the Form and Gallery to the same data source. What could be missing from my setup?

Categories:
  • Verified answer
    v-siky-msft Profile Picture
    on 11 Jun 2020 at 05:36:12
    Re: Invalid Formula. Expected a value compatible with 'DataSource'

    Hi @Anonymous ,

     

    Please try with this alternative workaround.

    Set OnSelect of BrowseGallery1:

    Set(SelectedItemID, ThisItem.ID)

    Set Form1.Item property:

    LookUp('Opportunities and Risk',ID=SelectedItemID)

    Use lookup function to retrieve the record from data source, and I believe this will resolve the error.

    Hope this helps.

    Sik

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete