<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>I&amp;#39;m having an issue in upload document. The situation is that I have to disp</title><link>https://community.appian.com/discussions/f/general/7612/i-m-having-an-issue-in-upload-document-the-situation-is-that-i-have-to-disp</link><description>I&amp;#39;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&amp;#39;am again returning to this screen, and since i have already uploaded</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: I'm having an issue in upload document. The situation is that I have to disp</title><link>https://community.appian.com/thread/31241?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 20:45:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c03c922a-be8f-4804-94f5-163dec8966fc</guid><dc:creator>kumaraveln</dc:creator><description>As mschmitt said, use of pv! variables can be eliminated by extracting the information directly from ac! variables in the output section of human task .. But if something goes wrong it would be difficult to understand whether the document object is captured properly from UI and which index are empty (or has value) in case if it is multiple .. You can keep the pv! till your logic is implemented and working perfectly and then remove them and map the rule directly to the ac&amp;#39;s&lt;br /&gt;&lt;br /&gt;My opinion is to still keep the pv variables for debugging purpose, as few pv&amp;#39;s of document type and the fact that they are used only within the same process should not cause a memory issue&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm having an issue in upload document. The situation is that I have to disp</title><link>https://community.appian.com/thread/31240?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 20:34:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cb632a4c-d466-419e-a803-7320d7899de2</guid><dc:creator>singaravelus</dc:creator><description>Gaurav,&lt;br /&gt;The variable ri!items[ri!index].appianDocId has the value  like &amp;quot;[Document:185625]&amp;quot; instead of only numbers like 185625.&lt;br /&gt;You can achieve this through&lt;br /&gt;a) While retrieving the value from the DB you can get only the values&lt;br /&gt;    E.g-1: Assume the result is stored in a CDT called documentDtls_cdt&lt;br /&gt;            You have to extract the values like ri!documentDtls_cdt.documentId&lt;br /&gt;b) String Handling&lt;br /&gt;  E.g-2: Use string operation &amp;quot;[Document: 185625]” and extract the number and ignore the [Document:]&lt;br /&gt;(a) is best approach.&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm having an issue in upload document. The situation is that I have to disp</title><link>https://community.appian.com/thread/31232?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 18:20:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6f7c8217-753e-4406-8e4a-949106de1317</guid><dc:creator>Mike Schmitt</dc:creator><description>To all of the above I&amp;#39;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&amp;#39;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.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm having an issue in upload document. The situation is that I have to disp</title><link>https://community.appian.com/thread/31212?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 12:09:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ed78ea5e-89c9-4502-847f-ef45beb299f5</guid><dc:creator>Sidhant Behura</dc:creator><description>@gaurava322- &lt;br /&gt;I interpretted the issue in a different way.Please refer the below solution.&lt;br /&gt;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.&lt;br /&gt;There should be a XOR gate which should check that the submit action was from the Upload button not from actual submit button.&lt;br /&gt;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).&lt;br /&gt;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.&lt;br /&gt;Hope the information was helpful.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm having an issue in upload document. The situation is that I have to disp</title><link>https://community.appian.com/thread/31211?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 11:49:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d4eb48f4-b701-4d82-ba02-9bccb470d72c</guid><dc:creator>Sidhant Behura</dc:creator><description>@gaurava322- The ri!items.appianDocId cdt field is of type &amp;quot;Text&amp;quot;, change it to &amp;quot;Integer&amp;quot;. Attaching screenshots of what happens when the appianDocId is &amp;quot;Text&amp;quot; and &amp;quot;Integer&amp;quot;. &lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="/cfs-filesystemfile/__key/communityserver-discussions-components-files/11/appianDocId_5F00_Integer.JPG"&gt;&lt;img src="/cfs-filesystemfile/__key/communityserver-discussions-components-files/11/appianDocId_5F00_Integer.JPG" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="/cfs-filesystemfile/__key/communityserver-discussions-components-files/11/appianDocId_5F00_Text.JPG"&gt;&lt;img src="/cfs-filesystemfile/__key/communityserver-discussions-components-files/11/appianDocId_5F00_Text.JPG" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm having an issue in upload document. The situation is that I have to disp</title><link>https://community.appian.com/thread/31210?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 11:43:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:db4dc0e9-6e0c-42a8-bce9-eb809dc108d5</guid><dc:creator>Sidhant Behura</dc:creator><description>@gaurava322- There is a small problem here.I have replicated the issue. I am sure the appianDocId type is &amp;quot;Text&amp;quot;. Please change it to Integer and it will work.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm having an issue in upload document. The situation is that I have to disp</title><link>https://community.appian.com/thread/31209?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 09:03:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9783a775-24ed-4df1-8f01-3c50a046a7ad</guid><dc:creator>yaswanthreddya</dc:creator><description>Hi Gaurav,&lt;br /&gt;I would like to suggest that to check the following: 1. How you are getting the Document ID? (It should be after the submission of form and check it in test rule whether it is getting actual Document Id or not)&lt;br /&gt;2. Check in DB whether actual document Id is stored or not?(after the submission of form)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm having an issue in upload document. The situation is that I have to disp</title><link>https://community.appian.com/thread/31208?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 09:00:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4d52111b-2c7e-465f-9e57-82fa4038ba81</guid><dc:creator>kumaraveln</dc:creator><description>@Gaurav: Don't try to capture the document id as an integer (saveInto: ri!items[ri!index].appianDocId) at the point of uploading. Use a pv of type document. Upon submission of the form get the document id using document(pv!yourDocVar, "id") and store it into your CDT variable. If there are multiple documents, define document of type multiple and loop through them and get the respective integer document ids. Your retrieval logic is perfect and no change is required there. &lt;br /&gt;&lt;br /&gt;This approach is required because of Appian's way of handling documents. As other practitioner's mentioned, Appian will create the document in a temporary location with a temporary id at the point of upload and recreate them in the target folder (and remove the temporary document) with a new document id only at the point of form submit. If you don't use a pv variable, you will not be able to get the actual document id in anyway using the temporary document id. The temporary document id is no longer referencing any object in Appian and hence you get this error.&lt;br /&gt;&lt;br /&gt;Please refer the below thread and post back if you have any question&lt;br /&gt;/search?q=OriginalPostID-132941&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm having an issue in upload document. The situation is that I have to disp</title><link>https://community.appian.com/thread/31207?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 08:01:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8da06e9d-70eb-44df-a38b-4d93ea29cb97</guid><dc:creator>sagarl511</dc:creator><description>@gaurava322 - Are you using document download link in editable grid? As I get your question you are trying to show link after submission of form.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm having an issue in upload document. The situation is that I have to disp</title><link>https://community.appian.com/thread/31205?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 07:30:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4ba1693d-fd8a-4893-b859-d51ed8d57b06</guid><dc:creator>sonalk</dc:creator><description>Hi Gaurav,&lt;br /&gt;Added to the above, have a look at the posts shared in the link below, can be useful for you to resolve the issue.&lt;br /&gt;&lt;a href="/search?q=OriginalPostID-190261"&gt;forum.appian.com/.../e-190261&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm having an issue in upload document. The situation is that I have to disp</title><link>https://community.appian.com/thread/31200?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 06:25:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d79433ae-f0cc-4f72-b9af-268705f7ac99</guid><dc:creator>sikhivahans</dc:creator><description>@gaurava Hi, would you be able to add some information with regards to how you are uploading the document(that is, are you submitting the form after the completion of document upload), how you are populating the documentId field in the CDT thereafter? At a very high level, what I could predict as of now, you are tying to utilise the temporary document object(the document uploaded in task becomes an actual document object after the form submission) and trying to obtain the properties of the same using fn!document() which actually throws an error as the temporary document hasn't become a actual document yet.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm having an issue in upload document. The situation is that I have to disp</title><link>https://community.appian.com/thread/31199?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 05:18:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dd5b0dfa-58c9-40ef-b660-5686652d9beb</guid><dc:creator>gaurava322</dc:creator><description>... get following: &amp;quot;[Document:185625]&amp;quot;.&lt;br /&gt;I tried modifying the label: document(ri!items[ri!index].appianDocId,&amp;quot;name&amp;quot;). So that i can get the name of the document.&lt;br /&gt;I am getting error: Interface Definition: Expression evaluation error in rule &amp;#39;testRowLayout&amp;#39; at function a!applyComponents [line 55]: Error evaluating function &amp;#39;document&amp;#39; : Expression evaluation error : Invalid function document.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>