cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Eyk
Frequent Visitor

Invalid Formula. Expected a value compatible with 'DataSource'

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?

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @Eyk ,

 

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

View solution in original post

2 REPLIES 2
v-siky-msft
Community Support
Community Support

Hi @Eyk ,

 

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

View solution in original post

The workaround seems to work, although i have had the "Gallery.Selected" method working before.

All seems hit and miss.

 

"We strive to work in an environment without workarounds"...

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,572)