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

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.


Join us at PWR EduCon - A Power Platform Conference

Learn from the top Power BI, Power Apps, Power Automate & Power Virtual Agents experts!

Top Solution Authors
Top Kudoed Authors
Users online (3,177)