Need to download files in zip format

Hi,

I have list of files on UI which i want to download in zip folder.

What is the way out to implement this approach.

Kindly share me any code or any approach on this ?

  Discussion posts and replies are publicly visible

Parents Reply
  • Thanks Mike for your inputs. Now I have followed your approach but having facing some exception. Sharing code snippet what I have done so far.

    secondaryButtons: a!buttonWidget(
                      label: "Download",
                      icon: "download",
                      saveInto: a!startProcess(
                        processModel: cons!DOC_ZIP_PROCESS,
                        processParameters: {
                          documents:
                           difference(a!forEach(
                    items: index(
                      local!dataSet.data,
                      "docId",
                      null
                    ),
                    expression: if(
                      or(
                        isnull(
                          fv!item
                        ),
                        not(
                          isobjectexists(
                            "Document",
                            tointeger(
                              fv!item
                            )
                          )
                        )
                      ),
                      "",
                      document(
                        tointeger(
                          fv!item
                        ),
                        "name"
                      )
                    )
                  ),""),
                          documentPath:
                           difference(a!forEach(
                    items: index(
                      local!dataSet.data,
                      "docId",
                      null
                    ),
                    expression: if(
                      or(
                        isnull(
                          fv!item
                        ),
                        not(
                          isobjectexists(
                            "Document",
                            tointeger(
                              fv!item
                            )
                          )
                        )
                      ),
                      "",
                      document(
                        tointeger(
                          fv!item
                        ),
                        "name"
                      )
                    )
                  ),""),
                          zipName: tostring(
                            "Test Doc"
                          ) & "File_.zip",
                        }
    
                    )

    Base Document - Blank

    Create New Document : True

    New Document Name-=pv!zipName

    New Document Desc : Blank

    Save In Folder - Temporary Documents(Selected folder via search browser window)

    Existing document- Blank

    Document to Add- =pv!documents

    Documents Path- =pv!documentPath

    In Document to Add and Documents Path I am passing same content . I am passing list of documents name as you suggested. But I am getting below error now.

    Where I am missing. Now in documents,documentPath in both variable there is no null data after using difference() function. I am not understanding where this null coming now.

Children