Announcements
Hello,
in this edit form I get this error even though the form is set to edit and the record value is set correctly.The hint says "a value compatible with datasource is expected" but datasource is the same as the build module.What am I doing wrong?
HI @Utente_365_1fl ,
You cannot use .Selected directly on a data source as you cannot "select" directly from it. If you have selected a record form a Gallery based on this data source, then you can use YourGalleryName.Selected
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.
MVP (Business Applications) Visit my blog Practical Power Apps
Look at the image: you will see on the left a gallery from which I have selected the record. In the center of the photo you see the form that has the record selected in the gallery as an item: therefore Lista_schede.selected. Despite this, the powerapp gives me an error
Hi @Utente_365_1fl ,
Is the Data source of the form the same as what the Items of the Gallery is based on ?
The data source of the gallery i the same of the form. The strange thing is that I allways done this way, and if I delete the screen and I create e new one I get the same error. I don't know what am I doing wrong.
@Utente_365_1fl ,
It does not make a lot of sense based on what you have now confirmed. I will give you an alternative (assuming the Gallery Items are based directly on the SP List), which is better in a lot of ways - at Gallery OnSelect
Set(gblRecord, ThisItem)
and the Item of the Form
LookUp( YourSPList, ID = gblRecord.ID )
Excuseme: I do not understand why you say when you write: "It does not make a lot of sense": nothing personal, maybe I explained myself badly. I wanted to say that the datasource of the form is the same o the gallery. Isn't that the way it should be done?
I meant the result of your code does not make sense to me (in other words it should work based on what you posted). I was giving you an alternate method that I am confident will work for you.
Solved! It didn't play because there was not the title field in the gallery
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 345 Most Valuable Professional
11manish 207 Super User 2026 Season 2
Mohsin Ali 177