<?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 find first of in a datasubset?</title><link>https://community.appian.com/discussions/f/general/18389/how-to-find-first-of-in-a-datasubset</link><description>Hello, 
 
 Is there a way to find the first of in a datasubset? For example I have a datasubset with 5 records. The 4th record has an id=null. If I pass in a datasubset and where id=null, it would return the index of 4. How would I approach creating an</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to find first of in a datasubset?</title><link>https://community.appian.com/thread/72405?ContentTypeID=1</link><pubDate>Sat, 29 Feb 2020 17:48:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6f24ba91-1d15-41ea-9314-bbabca915ff7</guid><dc:creator>payal31</dc:creator><description>&lt;p&gt;Hi Miked,&lt;br /&gt;&lt;br /&gt;I hope this code will help you.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;load(&lt;br /&gt; local!pagingInfo: a!pagingInfo(&lt;br /&gt; startIndex: 1,&lt;br /&gt; batchSize: - 1&lt;br /&gt; ),&lt;br /&gt; local!datasubset: todatasubset(&lt;br /&gt; {&lt;br /&gt; {&lt;br /&gt; id: 1,&lt;br /&gt; firstName: &amp;quot;A&amp;quot;&lt;br /&gt; },&lt;br /&gt; {&lt;br /&gt; id: 2,&lt;br /&gt; firstName: &amp;quot;B&amp;quot;&lt;br /&gt; },&lt;br /&gt; {&lt;br /&gt; id: 3,&lt;br /&gt; firstName: &amp;quot;C&amp;quot;&lt;br /&gt; },&lt;br /&gt; {&lt;br /&gt; id: null,&lt;br /&gt; firstName: &amp;quot;D&amp;quot;&lt;br /&gt; },&lt;br /&gt; {&lt;br /&gt; id: 5,&lt;br /&gt; firstName: &amp;quot;E&amp;quot;&lt;br /&gt; }&lt;br /&gt; },&lt;br /&gt; local!pagingInfo&lt;br /&gt; ),&lt;br /&gt; index(&lt;br /&gt; local!datasubset.data,&lt;br /&gt; wherecontains(&lt;br /&gt; tointeger(&lt;br /&gt; null()&lt;br /&gt; ),&lt;br /&gt; tointeger(&lt;br /&gt; local!datasubset.data.id&lt;br /&gt; )&lt;br /&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>