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 Platform Community / Forums / Power Apps / show data in edit form...
Power Apps
Unanswered

show data in edit form using distinct items in gallery

(0) ShareShare
ReportReport
Posted on by 130

Hi all,

I have a gallery in which I show distinct items from my SP list. I want to select any item from gallery and show corresponding data in my edit form. But it gives me an error("Expected a value compatible with datasource") when I use gallery.selected in items of edit form. Data source is same for both.

There are duplicate IDs in my SPList.

I'm using distinct(SPlist,column) to only show distinct column values in gallery.

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @r_voyager 

    I can see a problem because an edit form can only show one record but your gallery produces a Result that can be in multiple records.  Are you sure there are duplicate ID's in your SharePoint list.  The ID is assigned as metadata by SharePoint  at the time the record is created and the ID numbers are sequential and not reused if the record is deleted.  

  • kylzbaba Profile Picture
    182 on at

    The distinct function outputs a merged data and its schema will differ from that of its original data source. So gallery.selected.item will not be selecting an item but a merged group of data. Hence it will not work as the item property for your form hence the incompatibility error. Also the ID column in SharePoint is auto incremented also always unique. No number is ever repeated. I'm guessing you created a different "id" column and that's what has duplicate values. The first solution to create a unique identity for your data, that will solve what ever referencing issues you will ever encounter.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard