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.
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.
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.