Error when use function document()

Certified Associate Developer

In my interface, I user function document.

if(
                            document(tofolder(local!documentId), "size") > 0,
                            true,
                            false
                          )

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Lead Developer
    in reply to ujjwalrathore

    Newly-uploaded documents exist in a "special" system directory in Appian, and are moved to their eventual "target" destination upon Form Submission.  While still in that "special" directory, the document() function does not work on them, but they *do* have a valid Doc ID and certain (limited) functions still work on them - such as the "content object details by id" rule.

    this is a useful capability to know, because it can be used on-form to judge whether a particular document is previously uploaded or brand new, and control other functionality that depends on this.