Export Excel updated download link

Hello,

I am exporting a table on a button click and I want to give download link for the latest exported excel document.

So when I click on "Generate Excel" button, It should export a table and then update the download link for the latest document.

How can I achieve this on one interface. 

Thanks in advance!

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Associate Developer

    Hi Mohini,


    You can achieve your goal by doing something like this, In startprocess process model parameter you have to put your constant which is point to your process model, and processparameters parameter you have to put your document variable. 


    a!localVariables(
      {
        a!richTextDisplayField(
          labelPosition: "COLLAPSED",
          value: {
            a!richTextItem(
              text: "Download document",
              link: a!documentDownloadLink(
                label: "Download document",
                document: ri!document
              ),
              showWhen: a!isNotNullOrEmpty(ri!document)
            )
          }
        ),
        a!buttonArrayLayout(
          buttons: {
            a!buttonWidget(
              showWhen: a!isNullOrEmpty(ri!document),
              label: "Generate Document",
              style: "NORMAL",
              submit: true(),
              saveInto: a!startProcess(
                processModel: cons!SPT_PM_GENERATE_DOCUMENT,
                processParameters: {
                  id:ri!document
                }
              )
            )
          },
          align: "START"
        )
      }
    )
    ,

Reply
  • 0
    Certified Associate Developer

    Hi Mohini,


    You can achieve your goal by doing something like this, In startprocess process model parameter you have to put your constant which is point to your process model, and processparameters parameter you have to put your document variable. 


    a!localVariables(
      {
        a!richTextDisplayField(
          labelPosition: "COLLAPSED",
          value: {
            a!richTextItem(
              text: "Download document",
              link: a!documentDownloadLink(
                label: "Download document",
                document: ri!document
              ),
              showWhen: a!isNotNullOrEmpty(ri!document)
            )
          }
        ),
        a!buttonArrayLayout(
          buttons: {
            a!buttonWidget(
              showWhen: a!isNullOrEmpty(ri!document),
              label: "Generate Document",
              style: "NORMAL",
              submit: true(),
              saveInto: a!startProcess(
                processModel: cons!SPT_PM_GENERATE_DOCUMENT,
                processParameters: {
                  id:ri!document
                }
              )
            )
          },
          align: "START"
        )
      }
    )
    ,

Children
No Data