<?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>Having Trouble using filter function in NESTED CDT</title><link>https://community.appian.com/discussions/f/general/40083/having-trouble-using-filter-function-in-nested-cdt</link><description>Hi Everyone, 
 I have requirement to retrieve resulting CDT list by filtering nested CDT list containing key-value Tier:1 in nested CDT. 
 This is CDT list</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Having Trouble using filter function in NESTED CDT</title><link>https://community.appian.com/thread/153072?ContentTypeID=1</link><pubDate>Tue, 13 Jan 2026 15:34:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:73adcf94-17bf-4081-a9a0-845f654fdf4a</guid><dc:creator>Muhammad Ahmed</dc:creator><description>&lt;p&gt;Thank you Shubham. That&amp;#39;s exactly what I was looking for. I liked this approach better using foreach as opposed to using filter function. Appreciated your help!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Having Trouble using filter function in NESTED CDT</title><link>https://community.appian.com/thread/153056?ContentTypeID=1</link><pubDate>Mon, 12 Jan 2026 12:20:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2725f161-a44f-4b35-8389-2f2882d714e1</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;Check this&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!data: {
    {
      ReportFacilityId: 30803,
      FacilityId: 3551,
      FormInstanceId: 4271964,
      FacilityName: &amp;quot;Test 1&amp;quot;,
      IsSectionLarger: false,
      FacilityMode: {
        {
          A15LinkModeId: 17394,
          ModeId: 4,
          ToS: 1,
          Tier: 1
        },
        {
          A15LinkModeId: 17395,
          ModeId: 4,
          ToS: 3,
          Tier: 2
        }
      },
      Latitude: &amp;quot;33.3333000&amp;quot;,
      Longitude: &amp;quot;-66.6666000&amp;quot;,
      YearBuilt: 2017,
      FacilityTypeId: 12,
      SquareFeet: 55,
      PercAgCapResp: 1,
      PrivateModeId: 1,
      Notes: &amp;quot;Test test&amp;quot;,
      IsNew: false,
      IsUpdated: false,
      IsDeleted: false,
      ReportYear: &amp;quot;2020&amp;quot;
    },
    {
      ReportFacilityId: 30804,
      FacilityId: 3552,
      FormInstanceId: 4271964,
      FacilityName: &amp;quot;Test 2&amp;quot;,
      IsSectionLarger: false,
      FacilityMode: {
        {
          A15LinkModeId: 17396,
          ModeId: 4,
          ToS: 1,
          Tier: 1
        },
        {
          A15LinkModeId: 17397,
          ModeId: 4,
          ToS: 1,
          Tier: 2
        }
      },
      Latitude: &amp;quot;33.3333000&amp;quot;,
      Longitude: &amp;quot;-66.6666000&amp;quot;,
      YearBuilt: 2017,
      FacilityTypeId: 12,
      SquareFeet: 55,
      PercAgCapResp: 1,
      PrivateModeId: 1,
      Notes: &amp;quot;Test test&amp;quot;,
      IsNew: false,
      IsUpdated: false,
      IsDeleted: false,
      ReportYear: &amp;quot;2020&amp;quot;
    }
  },
  local!filteredResult: a!forEach(
    items: local!data,
    expression: a!update(
      fv!item,
      &amp;quot;FacilityMode&amp;quot;,
      {index(fv!item.FacilityMode, 1, null)}
    )
  ),
  local!filteredResult
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Having Trouble using filter function in NESTED CDT</title><link>https://community.appian.com/thread/153042?ContentTypeID=1</link><pubDate>Sat, 10 Jan 2026 09:57:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2c7469bc-a9bd-4dfb-837a-762eb705e439</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;&lt;a id="" href="https://docs.appian.com/suite/help/25.4/fnc_looping_filter.html"&gt;https://docs.appian.com/suite/help/25.4/fnc_looping_filter.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Having Trouble using filter function in NESTED CDT</title><link>https://community.appian.com/thread/153041?ContentTypeID=1</link><pubDate>Fri, 09 Jan 2026 20:44:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5e2680d9-2c91-4b0c-9754-1134a168728d</guid><dc:creator>Muhammad Ahmed</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; local!data: 
 {
	{
		ReportFacilityId:30803, 
		FacilityId:3551, 
		FormInstanceId:4271964, 
		FacilityName:&amp;quot;Test 1&amp;quot;, 
		IsSectionLarger:false, 
		FacilityMode:
		{
			{
			A15LinkModeId:17394, 
			ModeId:4, 
			ToS: 1,
			Tier:1
			}, 
			{
			A15LinkModeId:17395, 
			ModeId:4, 
			ToS: 3,
			Tier:2
			}, 
		},
		Latitude:&amp;quot;33.3333000&amp;quot;, 
		Longitude:&amp;quot;-66.6666000&amp;quot;, 
		YearBuilt:2017, 
		FacilityTypeId:12, 
		SquareFeet:55, 
		PercAgCapResp:1, 
		PrivateModeId:1, 
		Notes:&amp;quot;Test test&amp;quot;, 
		IsNew:false, 
		IsUpdated:false, 
		IsDeleted:false, 
		ReportYear:&amp;quot;2020&amp;quot;
	},
	{
		ReportFacilityId:30803, 
		FacilityId:3552, 
		FormInstanceId:4271964, 
		FacilityName:&amp;quot;Test 1&amp;quot;, 
		IsSectionLarger:false, 
		FacilityMode:{
			{
			A15LinkModeId:17396, 
			ModeId:4, 
			ToS: 1,
			Tier:1
			}, 
			{
			A15LinkModeId:17397, 
			ModeId:4, 
			ToS: 1,
			Tier:2
			},
		},
		Latitude:&amp;quot;33.3333000&amp;quot;, 
		Longitude:&amp;quot;-66.6666000&amp;quot;, 
		YearBuilt:2017, 
		FacilityTypeId:12, 
		SquareFeet:55, 
		PercAgCapResp:1, 
		PrivateModeId:1, 
		Notes:&amp;quot;Test test&amp;quot;, 
		IsNew:false, 
		IsUpdated:false, 
		IsDeleted:false, 
		ReportYear:&amp;quot;2020&amp;quot;
	}
}
 local!filteredResult:  a!forEach(
   items: local!data,
   expression: 
   fv!item.FacilityMode[1]
 ),&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The result is&amp;nbsp;&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;{&lt;br /&gt; A15LinkModeId:17394, &lt;br /&gt; ModeId:4, &lt;br /&gt; ToS: 1,&lt;br /&gt; Tier:1&lt;br /&gt; },&lt;/p&gt;
&lt;p&gt;{&lt;br /&gt; A15LinkModeId:17396, &lt;br /&gt; ModeId:4, &lt;br /&gt; ToS: 1,&lt;br /&gt; Tier:1&lt;br /&gt; },&lt;/p&gt;
&lt;p&gt;}.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What I want is the whole object with nested A15LinkMode. It would always be the case where I want to retrive first index of nested CDT&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Having Trouble using filter function in NESTED CDT</title><link>https://community.appian.com/thread/153038?ContentTypeID=1</link><pubDate>Fri, 09 Jan 2026 19:47:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f7e987f8-dbdb-4447-b582-5bd11567bb5b</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Did you consider to use the filter function with a separate predicate function?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>