Skip to main content
mayurim3258
Known Participant
Mar 11, 2024 7:38 AM UTC
Question

Saving documents into appian when the button submit is false

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
Inspiring
Mar 11, 2024 7:40 AM UTC

Hello [mention:fcf3fe8840e344169cca473e354fb852:e9ed411860ed4f2ba0265705b8793d05] 

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

mayurim3258
Known Participant
Mar 11, 2024 7:50 AM UTC

uyiu

konduruc733182
Inspiring
Mar 11, 2024 7:56 AM UTC

Could you please update your reply for better readability.

stefanhelzle0001
Brainy
Mar 11, 2024 7:50 AM UTC

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
Mar 11, 2024 8:06 PM UTC
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
Brainy
Mar 11, 2024 8:05 AM UTC

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
Known Participant
Mar 11, 2024 8:57 AM UTC

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
Mar 11, 2024 9:18 AM UTC

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

What do you try to achieve with this upload?

varuntejg243705
Inspiring
Mar 11, 2024 9:12 AM UTC

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.