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
12 replies
Subscribers
7 subscribers
Views
3979 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
I'm having an issue in upload document. The situation is that I have to disp
gaurava322
over 8 years ago
I'm having an issue in upload document. The situation is that I have to display the Upload Document control in a grid and once it is uploaded i need to store the document ID in DB. And if i'am again returning to this screen, and since i have already uploaded the document earlier and it is in DB, it should show the link to that document. In gridRowLayout, i am doing following:
if(
rule!APN_isBlank(ri!items[ri!index].appianDocId),
a!fileUploadField(
value: ri!items[ri!index].appianDocId,
saveInto: ri!items[ri!index].appianDocId,
target: cons!WMG_GBL_UPLOADED_DOCS_TARGET,
readOnly: true,
align: "RIGHT"
),
a!linkField(
label: "",
links: {
a!documentDownloadLink(
label: ri!items[ri!index].appianDocId,
document: ri!items[ri!index].appianDocId
)
}
)
)
Now the problem is as soon as i upload the document in the cell i...
OriginalPostID-212534
OriginalPostID-212534
Discussion posts and replies are publicly visible
Parents
0
Sidhant Behura
over 8 years ago
@gaurava322-
I interpretted the issue in a different way.Please refer the below solution.
For saving the document into the target knowledge center and for avoiding "'document' : Expression evaluation error : Invalid function document." error you can have a buttonWidgetSubmit with name "Upload" and style "NORMAL" which upon clicking submits the form, goes into the process model (which helps the document getting upload into the targeted KC) and then comes back to the same form immediately through activity chaining.
There should be a XOR gate which should check that the submit action was from the Upload button not from actual submit button.
After the XOR check there should be a script task by which you can initialize the document id(s) cdt field with the actual document id(s).
Now as you have the actual document id(s) you can convert it into a document and perform a variety of operations like fetching the name, size, download etc.
Hope the information was helpful.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Sidhant Behura
over 8 years ago
@gaurava322-
I interpretted the issue in a different way.Please refer the below solution.
For saving the document into the target knowledge center and for avoiding "'document' : Expression evaluation error : Invalid function document." error you can have a buttonWidgetSubmit with name "Upload" and style "NORMAL" which upon clicking submits the form, goes into the process model (which helps the document getting upload into the targeted KC) and then comes back to the same form immediately through activity chaining.
There should be a XOR gate which should check that the submit action was from the Upload button not from actual submit button.
After the XOR check there should be a script task by which you can initialize the document id(s) cdt field with the actual document id(s).
Now as you have the actual document id(s) you can convert it into a document and perform a variety of operations like fetching the name, size, download etc.
Hope the information was helpful.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data