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
4 replies
Subscribers
8 subscribers
Views
2357 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
previous version of a Document in SAIL
francescop389
over 7 years ago
hi all,
do you know how in SAIL can I show, for a given DocumentID, all its previous versions?
many thanks
OriginalPostID-261973
Discussion posts and replies are publicly visible
0
Ram
Certified Lead Developer
over 7 years ago
Hi Francesco,
The work around for your approach is that first you need to save each document individualy i mean don't let appian to create document versions.
Save all the related document ids in database and keep a reference column so that you can pull all the related document ids
Then you need to construct a URL to download the document with obtained doc id's. The URL for downloading documents can be seen below
forum.appian.com/.../106162
You can get "
forum.appian.com/.../"
using rule!APN_getSiteUrl() or you can keep it in a constant and this should be changed from environment to environment witn new URL
And keep the "doc/"" in a appian constant
Now construct the URL in a expression rule say getDocumentVersions() which takes document id as input. Code for the rule will be in below format
rule!APN_getSiteUrl() & doc/ & documentId
Now you can use apply() to iterate newly created getDocumentVersions() rule for document ids obtained from DB
Hope this will help you.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Ram
Certified Lead Developer
over 7 years ago
Adding to the above, since you have doc id's you can use below code in an expression and iterate it.
a!linkField(
label: "",
links: a!documentDownloadLink(
document:
)
)
This will be the better approach for creating document download link
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
francescop389
over 7 years ago
hi @akkramanir,
thanks for suggestion, but that's exactly what I was trying to avoid with my question :)
in my use case I already have a relationship between different documents, so I don't want to add different rows in the DB just for the version change.
what I need is to use the Appian versioning, and when a user select a document from a grid in SAIL, to show somewhere else (in another grid maybe) the list of previous version for that document.. but without having different documents as version
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Ram
Certified Lead Developer
over 7 years ago
Hi Francesco,
There is a plugin in shared components which gives metadata of a document please refer the below link.
forum.appian.com/.../summary
The only problem is that you cannot download the earlier versions of the documents since the old versions returned by the plugin have the same doc id.
I had the same scenario in my project and we opted for database to manage document versions. Lets see what other practitioners say.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel