<?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>Issue while getting document name by passing documentId</title><link>https://community.appian.com/discussions/f/new-to-appian/27946/issue-while-getting-document-name-by-passing-documentid</link><description>Hi, 
 I am trying to get the document name by passing the documentId. If I am fetching the documentid into a local variable and pass, then I am getting an error. Where as when I pass the documentId number manually, I am getting required output. 
 Not</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Issue while getting document name by passing documentId</title><link>https://community.appian.com/thread/108695?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 22:31:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:928f2bb2-97dd-4a9f-b4c0-b48f453fc824</guid><dc:creator>swapnar6405</dc:creator><description>&lt;p&gt;Great help. Thank you so much Naresh.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while getting document name by passing documentId</title><link>https://community.appian.com/thread/108694?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 22:25:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:97aaaefc-108e-4615-8b9f-5c7e21fec4b7</guid><dc:creator>Naresh</dc:creator><description>&lt;p&gt;Use the following logic.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="xml"&gt;a!localVariables(

  local!templateDetails: rule!LC_getTemp(Key: 4),
  local!documentId: cast(1,index(local!templateDetails, &amp;quot;documentid&amp;quot;,null())),
  document(local!documentId, &amp;quot;name&amp;quot;, &amp;quot;&amp;quot;)
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while getting document name by passing documentId</title><link>https://community.appian.com/thread/108693?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 22:22:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:199292d7-69d6-4780-b1d8-eba81bebf4a9</guid><dc:creator>swapnar6405</dc:creator><description>&lt;p&gt;Even if I convert to integer, I am getting an error&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/62/pastedimage1677709407503v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while getting document name by passing documentId</title><link>https://community.appian.com/thread/108692?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 22:19:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:35bfea2e-6658-4458-893b-05f48c20e621</guid><dc:creator>Naresh</dc:creator><description>&lt;p&gt;it is casting error. cast your documentId to integer.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="xml"&gt;a!localVariables(

  local!templateDetails: rule!LC_getTemp(Key: 4),
  local!documentId: tointeger(nindex(local!templateDetails, &amp;quot;documentid&amp;quot;,null())),
  document(local!documentId, &amp;quot;name&amp;quot;, &amp;quot;&amp;quot;)
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while getting document name by passing documentId</title><link>https://community.appian.com/thread/108691?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 22:17:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:729adf62-0ec7-45ca-bde1-65c777168e71</guid><dc:creator>pragna jadda</dc:creator><description>&lt;p&gt;please convert document id from list of variant to tointeger.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>