Appian Community and Appian Academy are being upgraded. As a part of the upgrade, Appian Community is currently in read-only mode, and user registration is disabled until August 3. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

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
  • 0
    Certified Lead Developer
    in reply to ujjwalr0002

    I do love the "getcontentobjectdetailsbyid()" rule for this though, because it can help us *specifically* distinguish between an already-uploaded file versus a newly-uploaded file.  Here's the expression rule I have set up for such a purpose (the "docExists" rule that gets called first just makes sure the doc ID is non null, non zero, and runs the "objectExists()" rule on it first)...

    and(
      rule!ENV_UTIL_docExists(ri!doc),
      find(
        "State: Active Published",
        getcontentobjectdetailsbyid(ri!doc)
      ) > 0
    )

Children