Skip to main content
kavyan471063
Known Participant
September 14, 2021
Question

Distinct documents in document picker

  • September 14, 2021
  • 5 replies
  • 0 views

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.

    5 replies

    selvakumark
    Participating Frequently
    September 14, 2021

    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.

    kavyan471063
    Known Participant
    September 14, 2021

    Thanks that works.