<?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>not getting downloadLink some times</title><link>https://community.appian.com/discussions/f/general/8392/not-getting-downloadlink-some-times</link><description>Hii#All ---not getting downloadLink some times for the Document in a grid please provide any suggestions on this Thanks, Praveen OriginalPostID-234119 Code.txt</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: not getting downloadLink some times</title><link>https://community.appian.com/thread/36753?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2016 20:55:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f4ba0b92-ed6f-4e92-94ed-ec45a5f35768</guid><dc:creator>jagadeesh</dc:creator><description>@praveen   if you keep a!documentDownloadLink(_) in a rule and call it from apply loop.. I was faced same issue when I am new to appian but the solution what was given above solved my problem ..&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: not getting downloadLink some times</title><link>https://community.appian.com/thread/36745?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2016 15:15:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cfad8b61-0d3e-4630-9d80-b620be862ac8</guid><dc:creator>sikhivahans</dc:creator><description>*(provided to&amp;#39;)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: not getting downloadLink some times</title><link>https://community.appian.com/thread/36744?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2016 15:15:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8097b48a-29db-4273-b54e-c8b2fdaf7b2c</guid><dc:creator>sikhivahans</dc:creator><description>@praveenkumark Isn't it worth writing rules as follows and reuse them as and when required?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;emobUtilIsValidDocument&lt;br /&gt;&lt;br /&gt;1. documentId_int (Number Integer)&lt;br /&gt;&lt;br /&gt;fn!if(&lt;br /&gt;\tfn!isnull(ri!documentId_int),&lt;br /&gt;\tfalse,&lt;br /&gt;\tfn!isObjectExists("Document",ri!documentId_int)&lt;br /&gt;\t/* isObjectExists avaliable at http://bit.ly/2coVGoM and safely ignores invalid document objects */&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;eumobUiDocumentDownloadLink&lt;br /&gt;&lt;br /&gt;1. documentId (Number Integer)&lt;br /&gt;&lt;br /&gt;fn!if(&lt;br /&gt;\trule!emobUtilIsValidDocument(documentId_int:ri!documentId_int),&lt;br /&gt;\ta!documentDownloadLink(label:fn!document(ri!documentId_int,"name"),document:ri!documentId_int),&lt;br /&gt;\tnull&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;And apply in your implementation as follows:&lt;br /&gt;&lt;br /&gt;links: if(rule!APN_isEmpty(data.tAttachmentids),{},apply(rule!eumobUiDocumentDownloadLink,data.tAttachmentids))&lt;br /&gt;&lt;br /&gt;As far as my knowledge is considered, you shouldn't remove the nulls and apply documentDownloadLink function. Let the nulls or invalid document ids be present in the actual data(provide to 'links attribute') similar to the nulls or invalid document ids present in the actual data in the 'data' attribute. Apply a!documentDownloadLink only on those elements that evaluate to proper document objects and don't apply it when the check evaluates to false. This way, you can make sure that the number of links is equal to the number of elements in data and can eliminate the mismatch between the both. Also, you can safely avoid invalid document objects(where document id is in the database but the actual document object is deleted), nulls and array handling which might cause errors at times.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: not getting downloadLink some times</title><link>https://community.appian.com/thread/36743?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2016 15:00:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1cfa4ad9-ea8c-4d48-a702-1a4c63325ba7</guid><dc:creator>aayusha</dc:creator><description>Can you please share the code?&lt;br /&gt;I suspect, the apply rule has not been implemented on the link.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: not getting downloadLink some times</title><link>https://community.appian.com/thread/36741?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2016 14:14:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:78413c3b-c97e-417a-b9d8-302b7c08a51c</guid><dc:creator>praveenkumark</dc:creator><description>attached screen Shot UI&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="/cfs-filesystemfile/__key/communityserver-discussions-components-files/11/issue-Screen-Shot.PNG"&gt;&lt;img src="/cfs-filesystemfile/__key/communityserver-discussions-components-files/11/issue-Screen-Shot.PNG" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>