<?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>What&amp;#39;s the proper use of index function?</title><link>https://community.appian.com/discussions/f/best-practices/30118/what-s-the-proper-use-of-index-function</link><description>Hello! I&amp;#39;m having a doubt about the use of the function index(), as a best practice in Appian development. In the Appian documentation appears as: index ( data, index, default ), but I know that we can use the function as: index ( data, index, index,</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: What's the proper use of index function?</title><link>https://community.appian.com/thread/121491?ContentTypeID=1</link><pubDate>Thu, 09 Nov 2023 06:38:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:36678184-ad22-4b9c-af1c-6fdf463a0dc5</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;I just published a blog post about the index() function.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://appian.rocks/2023/11/06/use-the-index-luke/"&gt;appian.rocks/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What's the proper use of index function?</title><link>https://community.appian.com/thread/121485?ContentTypeID=1</link><pubDate>Thu, 09 Nov 2023 05:47:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d3823174-284a-42fb-90fd-6cd595651204</guid><dc:creator>taruns7606</dc:creator><description>&lt;p&gt;According to me index function is used to fetch the&amp;nbsp;value from any particular data at a given index&amp;nbsp;from any data.&lt;/p&gt;
&lt;p&gt;for example:- index(data,index,{}), for example suppose i have querry rule and want to fetch data so i will simply do like this-- index(query rule,&amp;quot;data&amp;quot;,{}), and suppose if i need to fetch furhter value from data than in that case we will use nested index function with data as the first parameter and the whichever field we want to extract that will become the second parameter. and the third parameter is important to give because suppose if your expression doesn&amp;#39;t find value at the index what you are looking for so it should return something instead of giving errors so to avoid that error we pass the null parameter. I hope that answers your query.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What's the proper use of index function?</title><link>https://community.appian.com/thread/119746?ContentTypeID=1</link><pubDate>Mon, 25 Sep 2023 08:54:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3cb5ab7c-b549-41c9-a658-57f27fcaa85a</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Don&amp;#39;t use it like that. This is a edge case of the internal implementation and has zero official support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What's the proper use of index function?</title><link>https://community.appian.com/thread/119741?ContentTypeID=1</link><pubDate>Mon, 25 Sep 2023 08:38:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2d157852-bf61-4805-a9c3-80130d752210</guid><dc:creator>Jes&amp;#250;s Hormigos</dc:creator><description>&lt;p&gt;I&amp;nbsp;highly recommend only using 3 parameters in index function (normal behaviour). Using +3 params will work, but it is not the correct way to use so maybe in a future, Appian won&amp;acute;t support it. Instead of using nested index functions manually, I suggest you&amp;nbsp;create a function like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  reduce(
    index(_, _, a!defaultValue(ri!default, null)),
    ri!dictionary,
    ri!path
  )&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What's the proper use of index function?</title><link>https://community.appian.com/thread/119738?ContentTypeID=1</link><pubDate>Mon, 25 Sep 2023 07:48:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dcd96951-ab23-4bf8-ab85-9c6ff6b12fc4</guid><dc:creator>anmolvijayvergiya</dc:creator><description>&lt;p&gt;As far as I have explored the index function ,&amp;nbsp;&lt;span&gt;&lt;strong&gt;Index(CountriesES, &amp;quot;Cities&amp;quot;, &amp;quot;Town&amp;quot;, null)&lt;/strong&gt; could only be relevant to expression rule as it shows the below msg when we try to switch the expression&amp;nbsp;mode to design&amp;nbsp;mode in the interface.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/20/unnamed.png" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>