Skip to main content
January 24, 2024
Solved

unable to use a!submitUploadedFiles() in site

  • January 24, 2024
  • 31 replies
  • 1 view

hi, 

I am trying to use upload Files function. this is one of the step in my process. I have a final summary screen, which shows the files uploaded and they should appear as document upload link. 

I used a!submitUploaded files in the next button, which actually goes to fIle Upload Screen to the summary screen. 

It works fine , when I tested the interface. But shows an error in site. 

An error occurred while executing a save: Expression evaluation error: a!submitUploadedFiles() cannot be evaluated in this environment.

Target folder is not Document or Folder but marked as Folder.

Also, editor access permissions has been given to the Users for this folder.

 

    Best answer by mikes0011
    a!submitUploadedfiles will not work for interfaces called through process model

    Correct - it is specifically intended not to be used for interfaces in processes, since submitting a form does the same action inherently.  I was hoping it would be, since it would have enabled some more advanced single-form file operations, but alas for now we're stuck with having to submit a form to deal with uploaded documents.

    31 replies

    mikes0011
    Brainy
    January 24, 2024

    It sounds at first like you might have an issue with whatever you're setting as "target" in your a!fileUploadField() -- can you confirm what your configuration is here?  In my working site example with a!submitUploadedFiles() in use, i have the target pointing to a constant set to the upload target folder, and the constant's type is just "folder".

    January 24, 2024

    hi Mike , Thanks for the response. target is pointing to a constant set to target folder , type is also "folder"

    mikes0011
    Brainy
    January 24, 2024

    What Appian version are you on, just to confirm?

    stefanhelzle0001
    January 24, 2024

    Can you elaborate on what you try to achieve? What kind of "process" is this, and do you have a specific reason to not just use a normal start form process submit action?

    January 24, 2024

    Agree with Mike seems like there is an issue with the target that you provided, please check the target and try it again.

    Recommend you to refer https://docs.appian.com/suite/help/23.4/fnc_system_a_submituploadedfiles.html for better understanding.

    harshitb6843
    January 24, 2024

    It is because you can't use that function within an interface that is plugged as a UIT in a process. 

    mikes0011
    Brainy
    January 24, 2024

    I was unclear, because in the OP they say they're trying this on a Site.  However if it's actually being invoked in a User Input Task or Process Start Form, you're correct that it won't work.  I think the error message you get if you try that, though, is a bit more specific than the one described in the OP (though maybe not).

    harshitb6843
    January 24, 2024
    this is one of the step in my process

    Because of this line of OP, I am assuming they are using it in a UIT