<?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>How to get ID by generating PDF document!!!</title><link>https://community.appian.com/discussions/f/general/29098/how-to-get-id-by-generating-pdf-document</link><description>Hi all, 
 
 Actually, by using Dynamic DOCX Template I am generating a PDF. 
 Now I want that PDF ID to save in a process model. 
 
 I tried by creating a process variable of type number integer and tried saving the generated document from the plugin</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to get ID by generating PDF document!!!</title><link>https://community.appian.com/thread/114943?ContentTypeID=1</link><pubDate>Fri, 23 Jun 2023 18:47:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0911ca40-f150-4948-937e-44eeb91a1561</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;You don&amp;#39;t even need that. tointeger() will also work&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get ID by generating PDF document!!!</title><link>https://community.appian.com/thread/114941?ContentTypeID=1</link><pubDate>Fri, 23 Jun 2023 18:36:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2a7e5c5a-f4bd-4abf-b818-f9386b2bacee</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;Did you try doing document(pv!newPDF, &amp;quot;documentId&amp;quot;)?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.appian.com/suite/help/23.2/fnc_scripting_document.html"&gt;docs.appian.com/.../fnc_scripting_document.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get ID by generating PDF document!!!</title><link>https://community.appian.com/thread/114935?ContentTypeID=1</link><pubDate>Fri, 23 Jun 2023 16:57:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:636241b4-813e-4ee9-bc6b-272f4693936c</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;The &amp;quot;Document&amp;quot; type PV already (actually) contains the document ID - Appian just shows us the document&amp;#39;s name to be &amp;quot;user friendly&amp;quot; - but this can be cast to INTEGER type at any time we need - you could just use a subsequent script task to save that PV directly into an INTEGER type variable and you&amp;#39;d have it.&lt;/p&gt;
&lt;p&gt;But yes if you want/need to save the ID directly at save time, all you need to do is add an extra node output entry, just below the place you (already) have it configured to save into pv!newDocumentCreatedPDF:&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1687539435755v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get ID by generating PDF document!!!</title><link>https://community.appian.com/thread/114934?ContentTypeID=1</link><pubDate>Fri, 23 Jun 2023 16:53:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b93fcb73-4ff2-498b-acc2-7b3eb26f1574</guid><dc:creator>Shaik Gousi</dc:creator><description>&lt;p&gt;Yes,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img height="29" src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1687539021974v2.png" width="403" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I want the generated PDF document ID in a separate process variable.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;creating a process variable of type integer and saving the generated document ID worked well for excel documents but for PDF it&amp;#39;s not working. Let me know how to get ID of PDF into a process variable. Is their any other way?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get ID by generating PDF document!!!</title><link>https://community.appian.com/thread/114933?ContentTypeID=1</link><pubDate>Fri, 23 Jun 2023 16:49:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0fbff9c8-016d-408e-8e11-fda34f5cb7d5</guid><dc:creator>Shaik Gousi</dc:creator><description>&lt;p&gt;Yeah,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1. there are no errors, and I am trying to save the errors too for reference.&lt;/p&gt;
&lt;p&gt;2. I am already saving the PDF in a document but I need the ID of that PDF document.&lt;/p&gt;
&lt;p&gt;&lt;img height="32" src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1687538906357v1.png" width="445" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;3. Yeah, the nodes are not overriding.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get ID by generating PDF document!!!</title><link>https://community.appian.com/thread/114929?ContentTypeID=1</link><pubDate>Fri, 23 Jun 2023 16:36:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7c071a8c-c582-42b3-a2d6-7725433c7cb7</guid><dc:creator>Shaik Gousi</dc:creator><description>&lt;p&gt;Yes, and also saving the generated PDF in one of our folder also. But my requirement is to get the generated PDF document in the same process model, and I need to utilize that ID for an integration.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get ID by generating PDF document!!!</title><link>https://community.appian.com/thread/114926?ContentTypeID=1</link><pubDate>Fri, 23 Jun 2023 16:32:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:265c72b7-7710-4a13-9373-30ecefcfee93</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;Did you try creating a pv of type Document instead?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get ID by generating PDF document!!!</title><link>https://community.appian.com/thread/114925?ContentTypeID=1</link><pubDate>Fri, 23 Jun 2023 16:31:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3afafc25-92d3-457c-9f66-6ce063ad79d6</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;ol&gt;
&lt;li&gt;Make sure the smart service is not giving any errors. There are cases when the node will complete without the visible error but the out variable &amp;quot;Error&amp;quot; will tell you a different story. Store the error in some variable to check if everything is fine.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Try changing the type of that variable from int to doc.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Make sure no other nodes are overriding your variable and setting it back to null.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>