Create a Document Link for Nondisclosure Agreement

 Good Evening I have a question,  I need to provide a link to a document for user to be able to download.. I have read the same few documents and know that the DocumentLinkType is my best option. I also read a few other post and I saw this specific code :

 

a!linkField(
label:"File",
links:{
a!documentdownloadlink(
document:docId
)
}
)

I created and Interface with a Form Layout and within that lay out I have added a section component and a radio dial for users to Agree or Disagree... 

On the section component is where I want to store this document, when I select add component I select links and the add additional component for DocumentLinkType.`

My Issue is that I am so lost as to where I add this information In which Component? I am sure I need some additional logic as well.. Are there directions that show you on which component you should add which code. 

 

  Discussion posts and replies are publicly visible

Parents
  • Hi ,
    There are multiple ways to to add document in component . I can suggest a way to show document link in a grid.

    a!sectionLayout(
    label: "Doc Attachments",
    firstColumnContents: {

    if(
    rule!APN_isBlank(
    ri!document /* document data type*/
    ),
    {},
    a!gridField(
    totalCount: count(ri!document),
    emptyGridMessage: "No Documents",
    value: a!pagingInfo(
    startIndex: 1,
    batchSize: - 1
    ),
    columns: {
    a!gridTextColumn(
    label: "Document Link",
    data: if(rule!APN_isBlank(
    ri!document
    ),{},a!applyComponents(
    rule!getDocumentName( /* Expression Ruleto display Doc name (provided code below) */
    _,
    1
    ),
    ri!document
    )),
    links: a!applyComponents(
    a!documentDownloadLink(
    _,
    "Document1"
    ),ri!document)
    )
    }
    )
    )


    }
    )
    ***************************************************

    rule!getDocumentName :-
    if(
    rule!APN_isBlank(
    ri!document
    ),
    {},
    document(
    ri!document,
    "name"
    )
    )
    *********************************************************
    Hope this will work for you.
Reply
  • Hi ,
    There are multiple ways to to add document in component . I can suggest a way to show document link in a grid.

    a!sectionLayout(
    label: "Doc Attachments",
    firstColumnContents: {

    if(
    rule!APN_isBlank(
    ri!document /* document data type*/
    ),
    {},
    a!gridField(
    totalCount: count(ri!document),
    emptyGridMessage: "No Documents",
    value: a!pagingInfo(
    startIndex: 1,
    batchSize: - 1
    ),
    columns: {
    a!gridTextColumn(
    label: "Document Link",
    data: if(rule!APN_isBlank(
    ri!document
    ),{},a!applyComponents(
    rule!getDocumentName( /* Expression Ruleto display Doc name (provided code below) */
    _,
    1
    ),
    ri!document
    )),
    links: a!applyComponents(
    a!documentDownloadLink(
    _,
    "Document1"
    ),ri!document)
    )
    }
    )
    )


    }
    )
    ***************************************************

    rule!getDocumentName :-
    if(
    rule!APN_isBlank(
    ri!document
    ),
    {},
    document(
    ri!document,
    "name"
    )
    )
    *********************************************************
    Hope this will work for you.
Children
No Data