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
5 subscribers
Views
5985 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
Updating version of existing file.
amitas
over 7 years ago
There is a dropdown having all the names of files stored in knowledge center. User will select the desired file and click on update button. After clicking on the button, the desired file should be updated. I have saved the selected file in a new process variable of type document in script task and then given the same variable as target output in user input task having the value of the new file upload variable. Its giving an error "Invalid Destination Folder".Please help.
OriginalPostID-237323
Discussion posts and replies are publicly visible
0
Arun Theja Muthyalu
Certified Lead Developer
over 7 years ago
I suppose you are trying to replace an existing file with a new file upon your update operation. As per my knowledge, for file upload "target" is mandatory for file upload. So, try by giving the constant which points to your Knowledge Center Folder as target, if not already done.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
amitas
over 7 years ago
@arunthejam yea i have given the constant of type folder in target but when I am uploading a new file its getting saved as a new file only in knowledge center not as a updated version.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Rajasekhar Pamidipati
A Score Level 2
over 7 years ago
@amitas if you give target as the base document then it will create new version for it. for example you have document called "abc" then give this document as target for file upload field then if you upload new document using that file upload field it will create new version for "abc" document.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Arun Theja Muthyalu
Certified Lead Developer
over 7 years ago
From your question, "I have saved the selected file in a new process variable of type document in script task and then given the same variable as target output in user input task having the value of the new file upload variable." My understanding is that you are trying to use the same variable which contains Document for specifying the target too. That is why it is showing "Invalid Destination Folder" since that variable contains the Document not the location path to your Knowledge Center Folder.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 7 years ago
@amitas As said above by other practitioner, kc or folder couldn't be a target in the case of uploading a new version(in fact a folder location creates a new file rather than new version of the existing file)of an existing document. What you have done now seems to me nearly correct(just make sure that the selected document is stored in a variable and the same variable is the target of the fileUploadField). Added to this, I would suggest digging deep into the issue by checking from security perspective if you are performing the task as a basic user, checking the form/interface configurations and exploring logs as well to see if you can get any clue.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
amitas
over 7 years ago
@sikhivahans I tried giving the same selected doc as a value in new process variable new file upload but it was giving an error "Destination Folder invalid". Then I specified the constant of folder type as a target in file upload field in interface to upload a new file. But still it is getting saved as a new file in knowledge center.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
amitas
over 7 years ago
@arunthejam how to give the location path of knowledge center folder?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Rajasekhar Pamidipati
A Score Level 2
over 7 years ago
Hi Amitas,
Please look at the attached code once.
Testrule.txt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 7 years ago
@amitas Would you please be able to attach the code here so that the practitioners can take a look at it?. As long as your intention is to create a new version of a document, the target should be the variable which holds the document you are desiring to create the version for.
The 'target' attribute in the documentation at https://forum.appian.com/suite/help/16.2/SAIL_Components.html#FileUpload says "Determines the eventual location of the uploaded file. When a Folder, the uploaded file is created as a document in that folder. When a Document, the uploaded file is created as a new version of that document."
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Arun Theja Muthyalu
Certified Lead Developer
over 7 years ago
@sikhivahans True. "target" could be either a Document or Folder.
@amitas I would recommend you to dig in the Security perspective as suggested by sikhivahanas or post the code here so that we all can take a look at it.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>