Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

show data in edit form using distinct items in gallery

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.

  • kylzbaba Profile Picture
    kylzbaba 182 on at
    Re: show data in edit form using distinct items in gallery

    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.

  • Drrickryp Profile Picture
    Drrickryp 30,510 on at
    Re: show data in edit form using distinct items in gallery

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

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,532

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,050

Leaderboard