Document download

We want user to download files that are present in ECM system with a single click from Appian user interface.

We don't want to download and keep files on Appian server till user explicitly click on link to download file. How can we achieve file download (REST API call) and document link together on single button click?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    Use the a!documentDownloadLink field. The following code will be useful for you. 

    a!linkField(
    links: a!documentDownloadLink(
    label: "Download Health certificate Part II",
    document: todocument(
    rule!ASM_QE_GetAnimalHealthReports(
    animalId: ri!animalId,
    mediaCategoryId: 193,
    mediaNote: "Animal Health Report part II"
    )
    )
    ),
    showWhen: a!isNotNullOrEmpty(
    rule!ASM_QE_GetAnimalHealthReports(
    animalId: ri!animalId,
    mediaCategoryId: 193,
    mediaNote: "Animal Health Report part II"
    )
    )
    )

Reply
  • 0
    Certified Senior Developer

    Use the a!documentDownloadLink field. The following code will be useful for you. 

    a!linkField(
    links: a!documentDownloadLink(
    label: "Download Health certificate Part II",
    document: todocument(
    rule!ASM_QE_GetAnimalHealthReports(
    animalId: ri!animalId,
    mediaCategoryId: 193,
    mediaNote: "Animal Health Report part II"
    )
    )
    ),
    showWhen: a!isNotNullOrEmpty(
    rule!ASM_QE_GetAnimalHealthReports(
    animalId: ri!animalId,
    mediaCategoryId: 193,
    mediaNote: "Animal Health Report part II"
    )
    )
    )

Children
No Data