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
6 replies
Subscribers
7 subscribers
Views
3967 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
finddocumentsbyname() - if there are multiple documents with the same name, how
alastairw
over 11 years ago
finddocumentsbyname() - if there are multiple documents with the same name, how do I determine the most recent? ...
OriginalPostID-77412
OriginalPostID-77412
Discussion posts and replies are publicly visible
0
Sathya Srinivasan
Appian Employee
over 11 years ago
see
forum.appian.com/.../
Ideally, your process should update the existing document with a newer version instead of creating multiple documents of the same name. This will help you ease the querying process
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
alastairw
over 11 years ago
If we do that, will previous versions still be accerssible in any way?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sathya Srinivasan
Appian Employee
over 11 years ago
Yes. Appian maintains versioning on documents. If you want the user to be able to view the previous versions, you can write a simple expression to query the versions and generate the link to the versions. To the document URL, you would append
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sathya Srinivasan
Appian Employee
over 11 years ago
/suite/contents/GetContent.do?id={your document id}&version={the version you need}
you can get the max version (or the total no of versions) of the document using the document() function. Once you have this info, you can run an apply() function to generate the URL as stated above. Hope this helps.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
alastairw
over 11 years ago
So if I use versions, finddocumentsbyname() will only return the latest version of a single document. What if I don't use versions?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sathya Srinivasan
Appian Employee
over 11 years ago
That's correct. The functions will always point to the latest version of the document. If you don't use version, then the function will return multiple documents. This can be a genuinely unique document having the same names or the same document uploaded twice. If you are looking for document revisions, I'd recommend uploading a new version of the document.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel