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
2218 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
I am storing a document ID as an integer in a CDT, and I have a link in an inter
georgeu
over 9 years ago
I am storing a document ID as an integer in a CDT, and I have a link in an interface so that a user can download that document. However, in order to link to the correct document, I have to add 1 to the document ID number to get the correct document. Meaning that if the CDT stores a value of 10, the actual document ID is 11. Does anyone know where the discrepancy comes from? I'm not manipulating the value when it is uploaded in the original interface or in the process model, just storing it.
OriginalPostID-162734
OriginalPostID-162734
Discussion posts and replies are publicly visible
0
Mike Schmitt
Certified Lead Developer
over 9 years ago
This is expected behavior of the File Upload component in SAIL (see
forum.appian.com/.../SAIL_Components.html
basically it'll happen if you store the document ID into anything other than a Rule Input of type Document (and then stored into an ACP of type Document also). So basically you want to save it independently on-form, then populate it to your CDT afterwards.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
brettf
over 9 years ago
On a sail form, if you try to save a document ID directly into a CDT, it only returns a temporary document ID, which ends up being something along the lines of (actual document ID - numDocumentsStored) off for each document ID.
A workaround is to set the document name before the user input task, and then afterwards save the document into the CDT (via another script task) by getting the document by its name that you previously set.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
georgeu
over 9 years ago
Great, thanks for the help guys!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel