Document Does Not Exist or has been Deleted

Certified Senior Developer

Hello Everyone,

its working for the first when i upload file and file name 
when remove file and uploading the new one getting the error.
Thanks in advance for your help.

Thanks & Regards,

Srikanth.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    You could try this.
    It seems you're working on a lower version of Appian where the document function doesn't work on virtual document id.

    a!localVariables(
      local!indexDoc: ri!doc,
      {
        a!fileUploadField(
          label: "Upload Document",
          labelPosition: "ABOVE",
          required: true(),
          maxSelections: 1,
          value: local!indexDoc,
          target: "ADD YOUR CONSTANT HERE",
          saveInto: {
            local!indexDoc,
            a!save(ri!doc, save!value),
          }
        ),
        a!richTextDisplayField(
          value: {
            a!richTextItem(
              text: if(
                a!isNullOrEmpty(local!indexDoc),
                "not found",
                "File Uploaded Successfully"
              ),
              link: if(
                a!isNullOrEmpty(local!indexDoc),
                null,
                a!documentDownloadLink(document: local!indexDoc)
              )
            )
          }
        )
      }
    )

Reply
  • 0
    Certified Lead Developer

    You could try this.
    It seems you're working on a lower version of Appian where the document function doesn't work on virtual document id.

    a!localVariables(
      local!indexDoc: ri!doc,
      {
        a!fileUploadField(
          label: "Upload Document",
          labelPosition: "ABOVE",
          required: true(),
          maxSelections: 1,
          value: local!indexDoc,
          target: "ADD YOUR CONSTANT HERE",
          saveInto: {
            local!indexDoc,
            a!save(ri!doc, save!value),
          }
        ),
        a!richTextDisplayField(
          value: {
            a!richTextItem(
              text: if(
                a!isNullOrEmpty(local!indexDoc),
                "not found",
                "File Uploaded Successfully"
              ),
              link: if(
                a!isNullOrEmpty(local!indexDoc),
                null,
                a!documentDownloadLink(document: local!indexDoc)
              )
            )
          }
        )
      }
    )

Children
No Data