Skip to main content
October 31, 2021
Question

regarding grids with form

  • October 31, 2021
  • 17 replies
  • 0 views

How can we get in uploaded Document name ,uploaded by and uploaded on in supervisor form using grids of 3 column.

    17 replies

    stefanhelzle0001
    Brainy
    October 31, 2021

    What is the "supervisor form"?

    In general, you can get details of files AFTER the form has been submitted.

    csteward
    November 1, 2021

    Assuming that document is already uploaded, as Stefan notes, you can retrieve those properties using the document() function, such as:

    a!localVariables(
      local!doc: /* Your Document(s) here */,
    
      a!gridLayout(
        headerCells: {
          a!gridLayoutHeaderCell(label: "Document Name"),
          a!gridLayoutHeaderCell(label: "Uploaded By"),
          a!gridLayoutHeaderCell(label: "Uploaded On")
        },
        rows: a!forEach(
          items: local!doc,
          expression: a!gridRowLayout(
            id: fv!index,
            contents: {
              a!richTextDisplayField(
                value: a!richTextItem(
                  text: document(fv!item,"name")
                )
              ),
              a!richTextDisplayField(
                value: a!richTextItem(
                  text: document(fv!item,"lastUserToModify")
                )
              ),
              a!richTextDisplayField(
                value: a!richTextItem(
                  text: document(fv!item,"dateCreated")
                )
              )
            }
          )
        )
      )
    )

    November 1, 2021

    a!localVariables(

    local!doc:/* your documents here*/

    So here documents in the sense target documents or what?

    So my target documents here cons!name of file.

    csteward
    November 1, 2021

    The local!doc variable would point to the document or list of documents you want to display these details for.  If your documents are stored in a constant (?) you would point to that constant.

    I'm not sure exactly what you mean with "target documents here cons!name of file", do you have a constant that stores the text name of the document?  Versus having the document object type or document ID?