how to use the a constant to create a document link?

Hello,

I am trying to add a document link to an interface. I found the a!documentDownloadLink function and it tells me to create a constant to point to my documents but I am a bit lost.

This is an interface where a supervisor will approve or deny a request so the document link in the form should be attached to the specific request. What do I need to do in the cosntant to point specifically to that value?

The value is store in my recordType as an integer and it is added to the record through an attachment component in a record action. 

any help is appreciated

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Senior Developer

    I don't see that constant is required for a!documentDownloadLink()

    If document id stored in DB and document id exist in appian simply use document id from record. use below code to understand more.

    {
      a!linkField(
        label: "Download document",
        labelPosition: "ABOVE",
        links: {
          a!documentDownloadLink(
            label: document(
              documentId:{}, /*Add your document id here from record.*/ 
              property: "name"
            ),
            document: {} /*Add your document id here record.*/
          )
        }
      )
    }
Reply
  • +1
    Certified Senior Developer

    I don't see that constant is required for a!documentDownloadLink()

    If document id stored in DB and document id exist in appian simply use document id from record. use below code to understand more.

    {
      a!linkField(
        label: "Download document",
        labelPosition: "ABOVE",
        links: {
          a!documentDownloadLink(
            label: document(
              documentId:{}, /*Add your document id here from record.*/ 
              property: "name"
            ),
            document: {} /*Add your document id here record.*/
          )
        }
      )
    }
Children