Skip to main content
Inspiring
Oct 31, 2021 2:29 PM UTC
Question

regarding grids with form

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
    Oct 31, 2021 2:45 PM UTC

    What is the "supervisor form"?

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

    csteward
    Brainy
    Nov 1, 2021 3:10 PM UTC

    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")
                )
              )
            }
          )
        )
      )
    )

    Inspiring
    Nov 1, 2021 3:43 PM UTC

    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
    Brainy
    Nov 1, 2021 3:47 PM UTC

    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?