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
5 replies
Subscribers
4 subscribers
Views
1870 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
Hello, I am looking for help with document uploads in Appian.
issamd
over 8 years ago
Hello,
I am looking for help with document uploads in Appian.
Is there a way to delete versions of a document at specific indexes, and will Appian then update the version numbers?
For example, I have a document with 4 versions and I want to delete versions 2 and 3. I want the final result to be that there are two versions of the document, and version 4 is now labeled version 2.
Is this possible?
OriginalPostID-212588
OriginalPostID-212588
Discussion posts and replies are publicly visible
0
Tim
Certified Lead Developer
over 8 years ago
This is only possible from the designer interface I believe.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
issamd
over 8 years ago
I was hoping to find a way to do this within the process model.
The use case is as follows:
There are three forms. A user can upload a document on form two. From any of the forms you can click previous to return to a previous form. When the user returns to form two they can choose to upload a document again or continue with the document they uploaded already. When they upload another document this increments the document to version 2, even though the process hasn't been completed yet.
We are trying to avoid these extra, unnecessary versions.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
kumaraveln
over 8 years ago
For your use case you can try something like this. First you can change your mapping (in fileUploadField) so that each time user uploads a file, a new document will be created in your target folder (instead of single doc with multiple version). In this way you get different documentId for each time user uploads a file. You can have an additional pv variable (to have a copy of prev uploaded doc obj). Whenever user goes back and forth, you can compare the prev and current doc obj. If they are same no issue, else you can delete the prev doc obj from target folder and copy the new obj again into the additional pv. The loop continues.
If you think this approach is not effective, everytime a file is uploaded in Form_2, you can upload them in a temp folder say Folder_A. But remember your process variable will always have the latest uploaded doc. So when you finally submit the third form or at end of your process move only the recent document to Folder_B (your actual application folder) and cleanup everything in Folder_A at one shot.
These are like a workaround and may not be an effective solution. Lets wait for other people to comment.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Lakshmi Meyyappan
over 8 years ago
I have not had the chance to test this solution, but you may be able to use the "Get Document Versions Metadata Information" plugin to retrieve the document Id for a specific version, then you should be able to run the delete document smart service on the specific version document Id.
forum.appian.com/.../e-202289
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
issamd
over 8 years ago
I may have found a solution. I found a smart service for deleting document versions, though I believe it is a plug-in that another developer implemented.
I can determine which versions need to be deleted and do so using this .
Thank you all for your input!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel