Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
18 replies
Subscribers
7 subscribers
Views
10140 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Upload Document with default save button does't work
vasilisg
over 8 years ago
Hi,
We are working on Appian 16.3 (appian cloud) and we have the following form issue: we have created a form that has a fileUploadField() component, we upload the document and then press the save button and when reopening the form the document has been lost.
In order to fix this issue, we have created a custom save submit button that saves the documentId to a variable so when reopening the form, the document is shown uploaded.
So now the problem has been tranformed into how to remove the default save button?
Any advice is appreciated,
Thank you.
OriginalPostID-241815
Discussion posts and replies are publicly visible
Parents
0
brettf
over 8 years ago
I'm not entirely surprised that this does not work, actually. The way Appian handles document uploads is through temporary document IDs. When you initially upload the document on the form, the document is put into a temporary folder and given a temporary document id. When a submit widget button is called, it updates all PVs of type document with new document IDs, as well as moves the documents to the appropriate folders.
Since the save button defaultly in Appian does not actually submit the form, it is not really plausible to have uploaded documents be saved as well, since Appian would then re-do the logic for changing the document ID when you do actually submit the form.
The way we have handled this in the past is to, as you have done, have a custom save button of type submit, and to have a separate PV for previously uploaded documents and for newly uploaded documents. You would also need to add SAIL and some other logic to handle users deleting previously uploaded files though.
It's a bit of a frustrating limitation of the default save, but I can see why the limitation is there.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
brettf
over 8 years ago
I'm not entirely surprised that this does not work, actually. The way Appian handles document uploads is through temporary document IDs. When you initially upload the document on the form, the document is put into a temporary folder and given a temporary document id. When a submit widget button is called, it updates all PVs of type document with new document IDs, as well as moves the documents to the appropriate folders.
Since the save button defaultly in Appian does not actually submit the form, it is not really plausible to have uploaded documents be saved as well, since Appian would then re-do the logic for changing the document ID when you do actually submit the form.
The way we have handled this in the past is to, as you have done, have a custom save button of type submit, and to have a separate PV for previously uploaded documents and for newly uploaded documents. You would also need to add SAIL and some other logic to handle users deleting previously uploaded files though.
It's a bit of a frustrating limitation of the default save, but I can see why the limitation is there.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data