Showing results for 
Search instead for 
Did you mean: 
Super User
Super User

Help with Form Item Property


Error is: Expected a value compatible with data source.

I know the workaround of this:

I use OnSelect property of Galley to : Set(SelectedItemID,ThisItem.ID). 

And then Form's item property to:  LookUp(DataSource,ID=SelectedItemID).


The problem is the code that currently gives error works flawlessly since many days. And suddenly starts showing error. This happened in many of my apps. I want to know the reason.

Super User
Super User

Hi @zmansuri ,

Your "workaround" is actually the best practice (in my view at least) and I use it on every form I make as it is referring to the data source record directly and will refresh automatically. I have seen issues with GalleryName.Selected in the past - it is referring to the chosen item indirectly.


Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,064)