Hello guys!
I'm struggling to find a solution for this and if you could do I really appreciate!!!
I have two SharePoint Lists: one called "Contracts" and other "Document List".
The first one has contract request information and the second one is a list of documents that people may add related to contract request information. I separated in two lists because I had several problems on attaching lots of documents per list item, so in "Document List" I add one file per item when attaching.
The thing is: I created a button inside a gallery to ocasionally delete some list items, but every time I remove and then click on a Refresh button, the item appears again in the gallery.
Here's what I did:
1. in Screen:
OnVisible: Set(_Loading;true);ClearCollect(colAttachments, Filter('Document List';'ID Contract'= SelectedItem.ID));Set(_Loading;false)
2. in Remove Item Button:
OnSelect: Remove('Document List',First(Filter('Document List',ID = ThisItem.ID)));
Remove(colAttachments,ThisItem);
Refresh('Document List')
3. in Refresh Gallery Button:
Refresh('Document List');
ClearCollect(colAttachments,Filter('Document List','ID Contract' = SelectedItem.ID))
How can I avoid that delay? Users is often saying that in the first time they press Refresh Button, the item appears again.
I really appreciate if you experts guys could help!
Thanks.