Hi All ,
In File Upload Control , I don not want to save the File in Knowledge Center Folder when User First Upload and then Click Cancel or Close the Tab . What should I do in this case .
Discussion posts and replies are publicly visible
The file is persisted when the user clicks a submit enabled button. An option might be to clear the rule input which stores the document on clicking the submit button.
saurabh sharma said:Click Cancel
If the Cancel button is submit=true, the document still gets uploaded even if you null the documents variable. One way to tackle it is to delete the uploaded documents in process when the user clicks cancel.
saurabh sharma said:Close the Tab
This shouldn't upload the document, unless if you have something like wizard style form etc. In those cases you can delete these stale docs and terminate the process on a timer.
Just did a test. If you null documents, no document will be created in your target folder. The temporary document uploaded while you are on the form, will be taken care of by Appian.
That's interesting, I tested on 21.1 and it still uploaded the document to my target folder when I hit cancel.
Please can you share how you setting the variable to null.
Except of keyword syntax this is what I did as well.
It makes a lot of sense that it works. The saveInto of a submit button is evaluated after validations are OK and before the actual submit.
I tried setting to {} and null both result in uploading the file.
Agreed. Did another test and confirm that. Will raise a support case. Which Appian version do you work on?
21.1
Unknown said:An option might be to clear the rule input which stores the document on clicking the submit button.
nope. it will prevent the document ID from being passed into the process, but will not prevent the document from landing in the target folder. the only viable methods I've found to handle this are to either disable the "cancel" button, or to have the SAIL form track "newly uploaded" document IDs and pass them into an "orphaned doc IDs" list when Cancel is clicked, then have a special flow in the process to delete orphaned documents.
Edit: of course I replied before reading the rest of the thread. Did your tests eventually bear this out? In the (not very distant) past I've tested this extensively, but maybe not within the previous 2 or 3 Appian versions, in case anything's changed.
The recent I tested is 21.1 and it's same behavior.