Skip to main content
mayurim3258
March 11, 2024
Question

Saving documents into appian when the button submit is false

  • March 11, 2024
  • 13 replies
  • 1 view

HI, I am trying to implement a functionality where I need to save documents from a file upload field to Appian. The button's submit parameter is false. Any idea how this can be implemented?

13 replies

konduruc733182
March 11, 2024

Hello [mention:fcf3fe8840e344169cca473e354fb852:e9ed411860ed4f2ba0265705b8793d05] 

Could you please share the code snippet of your Upload field and the submit button.

mayurim3258
March 11, 2024

uyiu

konduruc733182
March 11, 2024

Could you please update your reply for better readability.

stefanhelzle0001
Brainy
March 11, 2024

In my applications, I save various meta data to the database when uploading files. This makes managing files much easier on the long run.

Use this function:

https://docs.appian.com/suite/help/24.1/fnc_system_a_submituploadedfiles.html

mikes0011
Brainy
March 11, 2024
Use this function:

Sadly this function still doesn't work on Task or Start Forms, which though it may make sense given the main Appian-specified use case, is still unfortunate due to how (with careful usage) it woud allow a lot of extra flexibility even in traditional locations where it'd be great to finally be able to persist files to the Appian FS prior to submitting a task.

The Expression Guru
harshitb6843
March 11, 2024

You can use a!submitUploadedFiles() function as Stefan said, but please note that if your interface is in a process model (which I assume is because you mentioned about submit: false()) then this function won't work. It works either on a site page, on a standalone interface that is not plugged in a Process. 

mayurim3258
March 11, 2024

Hi [mention:b8ea18cfbb2e4f6d841cf3c1d4d7420b:e9ed411860ed4f2ba0265705b8793d05] , Yes this interface is in Process Model and using this function throws error "a!submitUploadedFiles() cannot be evaluated in this environment.". Any other way we can have this implemented?

stefanhelzle0001
Brainy
March 11, 2024

No. The whole purpose of this is to start off the process.

What do you try to achieve with this upload?

varuntejg243705
March 11, 2024

You can use a!writeRecords in submit button saveInto for uploading files into db, then a request id is generated (do onSuccess configuration), pass that request id through rule inputs into process model if you need it for whole data need to be saved in DB.