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
3 replies
Subscribers
7 subscribers
Views
2440 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
When we use the a!fileUploadField, we're saving the document Id to a CDT var
nickh413445
over 9 years ago
When we use the a!fileUploadField, we're saving the document Id to a CDT variable.
The document is uploaded, but the document ID generated on the file upload does not match the document ID in the knowledge center (off by 1), so we're unable to use the ID stored in the CDT to access the document.
Has anyone run into this before, and how do you go about storing the correct ID into a CDT variable?
OriginalPostID-159045
OriginalPostID-159045
Discussion posts and replies are publicly visible
0
akshayan
Certified Lead Developer
over 9 years ago
You can not use the temporary document id generated before the form is submitted. You can search an find many forum posts related to this.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
akshayan
Certified Lead Developer
over 9 years ago
As soon as you upload a document, it's assigned a temporary id (and the document itself is kept in temporary documents folder). Once you submit the form, document is moved to target folder and a permanent id is assigned. Use the document id that is generated once you submit the form.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
marco.molteni
Appian Employee
over 9 years ago
Hi Nick,
some more details to the correct answer of Akshaya: as explained in the documentation (scroll to the notes :
forum.appian.com/.../SAIL_Components.html
the Document object is updated with the final ID after the form is submitted but integer values that contain the ID are not updated even if they are in a CDT. From the upload form pass the Document variable to the process and not the id, you can add a Script Task with an output node that writes the Document variable in the field (Integer) of your CDT to store the final ID. This works with arrays of documents too.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel