I'm having an issue in upload document. The situation is that I have to disp

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
    Certified Lead Developer
    To all of the above I'd just like to add one point on technique that can help de-clutter the process model of unnecessary extra PVs (and gateways). While it is required to save the uploaded document into its own document-type RI, assoicatied to a document-type ACP, it's not necessary to pass that back into a PV; you can instead use logic in the node output to check whether ac!uploadedDocument was populated, and if so, store its ID value into pv!myCdt.appianDocId.
Reply
  • 0
    Certified Lead Developer
    To all of the above I'd just like to add one point on technique that can help de-clutter the process model of unnecessary extra PVs (and gateways). While it is required to save the uploaded document into its own document-type RI, assoicatied to a document-type ACP, it's not necessary to pass that back into a PV; you can instead use logic in the node output to check whether ac!uploadedDocument was populated, and if so, store its ID value into pv!myCdt.appianDocId.
Children
No Data