Hi guys,
I tried to use document picker to select documents, but its selecting the same document multiple times. I want the selected documents to be distinct. Thanks for the solutions in Advance.
Discussion posts and replies are publicly visible
Hi Kavya,
A union() in the save into might help to get distinct documents:
a!localVariables( local!documents, a!pickerFieldDocuments( label: "Document Picker", labelPosition: "ABOVE", folderFilter: tofolder(3244), value: local!documents, saveInto: { local!documents, a!save( local!documents, union(local!documents, local!documents) ) }, maxSelections: 3, validations: {} ) )
As far as I know, we cannot restrict the document picker to not show selected values again.
Thanks that works.
FYI you shouldn't have to save into local!documents twice like this. That's what "save!value" is for --
saveInto: { a!save( local!documents, union(save!value, save!value) ) }
Agreed! I just referenced the code in the question & missed this one.
Thanks for the reply. I have another requirement like If my list of document has {Horror, Romance,Fantasy,Mystery} and I chose Horror from the picker , for the next time when I search for another genre, I don't want Horror in the list. I asked some suggestions and tried using difference and remove options , Neither of it is working. Can you help me with this.