web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

error in a form

(0) ShareShare
ReportReport
Posted on by 256

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?

errore form modifica.jpg

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    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

  • Utente_365_1fl Profile Picture
    256 on at

    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

  • WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    Hi @Utente_365_1fl ,

    Is the Data source of the form the same as what the Items of the Gallery is based on ?

  • Utente_365_1fl Profile Picture
    256 on at

    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.

  • WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    @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
    )

     

    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

  • Utente_365_1fl Profile Picture
    256 on at

    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?

  • WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    HI @Utente_365_1fl ,

    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.

  • Verified answer
    Utente_365_1fl Profile Picture
    256 on at

    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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard