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
11 replies
Subscribers
6 subscribers
Views
3973 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
Hello, I want to implement functionality that will save documents to
issamd
over 9 years ago
Hello,
I want to implement functionality that will save documents to the knowledge center and if a document has the same name as another document in the knowledge then I want a number appended to the end of the document name.
Does Appian have built in functionality for this?
OriginalPostID-183198
OriginalPostID-183198
Discussion posts and replies are publicly visible
0
ChristineH
Certified Lead Developer
over 9 years ago
This plugin may help:
forum.appian.com/.../summary
It has an expression that seems to do what you are asking:
"UPDATED 07.01.2014
- New function getContentDetailsByInternalName returns information about a content object (i.e. document) given its internal file name. If you know in what KC this file is located (based on its physical location, e.g. accdocs2\\8\\10000119.pdf is located in KC 8 ) you can narrow down the search and get a result faster by passing the KC as an optional parameter. Example:
getContentDetailsByInternalName("10000119.pdf",8)
"
Hope that helps!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
issamd
over 9 years ago
So with this plug in, if a user uploads a document called "Test", then later uploads another document called "Test", the system will change the name to "Test_1"?
If they upload another document called "Test", will the system change that third document to "Test_2"?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ChristineH
Certified Lead Developer
over 9 years ago
I think this function would just be a starting point to see if the filename exists and then you could rename the document that your user uploaded.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
issamd
over 9 years ago
Okay cool! That's a good starting point, thanks!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Shyam Bommakanti
Certified Lead Developer
over 9 years ago
Internal names are different from the user uploaded/set file names on the from UI. There can be unlimited number of documents in different KC or folders with same names and they all will have different internal document name. Maybe you should explore Custom content functions plugin to search for the document name:
forum.appian.com/.../summary
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
Re Custom Content Functions plugin, I don't think it's the right one to use as we haven't had a good experience with it. For instance, findDocumentsByName in this plugin won't return you any search results if the document's name we are searching for includes special characters (For instance, if the document name contains a hyphen i.e. "-", this document won't be returned by findDocumentsByName)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
issamd
over 9 years ago
I have a list of the current document names both in the database and in process, but I need a function that will compare the names and, if any of them equal each other, then to append a _1, or (1) to it, the same way the Windows handles documents with the same names.
My concern isn't getting the documents, it's a function to make the comparison, to then save that to an array.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@issamd There isn't an inbuilt functionality to handle this as far as my knowledge is considered. You may need to write an expression which gives you a proper name by using the OOTB Text functions available at https://forum.appian.com/suite/help/7.11/Text_Functions.html and the information(about document names) you have had in database.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
issamd
over 9 years ago
Hello, thank you all for your responses.
After much tinkering I have created an expression to handle this job.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rohitw
Certified Lead Developer
over 9 years ago
How did you resolve this? Could you please provide some details.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>