Hello,
I have a gallery (datasource in Sharepoint) that is filtered according to the person logged in as the source contains a person filed associated with each entry. It looks like this:
What I am trying to do is ask people if they are still part of a Committee. If they click on "I am no longer part of this committee", it should remove that entry from that datasource and also from the gallery (Which I am able to accomplish).
When people click on "Yes, I am still in", it should remove that item from the gallery (giving user the feeling that they have tackled that entry) but not from the datasource. This is what I am having trouble with.
Any ideas?
Thank you in advance
Solved! Go to Solution.
The gallery just shows a filtered and sorted list of what is in the datasource. For the functionality that you describe I would create a copy of the datasource records that are shown in the gallery, then point the gallery at the collection, not the datasource. Then you can either delete records from the collection when they click I'm in. Or maybe create an additional yes/No column that is toggled on that record when they click. Then filter the gallery based on that column being No.
The gallery just shows a filtered and sorted list of what is in the datasource. For the functionality that you describe I would create a copy of the datasource records that are shown in the gallery, then point the gallery at the collection, not the datasource. Then you can either delete records from the collection when they click I'm in. Or maybe create an additional yes/No column that is toggled on that record when they click. Then filter the gallery based on that column being No.
Hello,
I was able to solve it. I fetched the filtered list as a collection on OnStart of the application and then displayed it as a gallery. On OnClick of "Yes, I am still in", I removed the entry from the collection only (Select(Parent);Remove(CollectionName,ThisItem)) but on OnClick of "I am no longer part of this committee" I actually removed the item from the datasource and then ClearCollected the collection again:
Select(Parent);RemoveIf(SPDataSource,Title=Gallery1.Selected.Title);Refresh(SPDatasource);ClearCollect(CollectionName,Filter(SPDataSource,Lower(Right(Member.Claims,Len(glbUserEmail)))=Lower(glbUserEmail)).Title)
User | Count |
---|---|
153 | |
98 | |
88 | |
78 | |
58 |
User | Count |
---|---|
189 | |
184 | |
106 | |
99 | |
91 |