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
7 subscribers
Views
2620 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hello, I have a question on fileUploadField: Once I select a file to uplo
maheshp664
over 9 years ago
Hello,
I have a question on fileUploadField: Once I select a file to upload, how can I access the name of the file being uploaded? I need to check if file with same name has already been uploaded earlier. An example would be appreciated.
OriginalPostID-140769
OriginalPostID-140769
Discussion posts and replies are publicly visible
0
Sathya Srinivasan
Appian Employee
over 9 years ago
Content service plug-in has a function called getDocumentByName. An option is to check if the file exists or not before uploading the new file.
Note: Appian does not restrict files by file name. So you can have multiple files with the same file name within a folder.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Jason Ruvinsky
Certified Senior Developer
over 9 years ago
Sathya, is this possible prior to submitting the form? We haven't been able to access a document name while the document is in the "temporary" state prior to SAIL form submission.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
maheshp664
over 9 years ago
I believe you cannot access the properties of the temporary document...I tried the following....
saveInto: { local!uploaddoc, a!save(local!fileName,document(local!uploaddoc,"name"))}
and...got this error....
Error evaluating function 'document' : com.appiancorp.suiteapi.common.exceptions.InvalidDocumentException: Document Does Not Exist or has been Deleted
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rupeshc
over 9 years ago
You cannot check its name until the form is submitted as it only have a temporary document Id, till form submission.
Once your form is submitted, redirect the process flow to your form again and then use the document function to calculate the uploaded document name. After then you can do the further manipulations, like matching it with all the other document name.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
atulp
over 8 years ago
a!fileUploadField(target:ri!target,value:local!document).uploadedDocumentName)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel