<?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>Sorting a paging grid column that is a nested CDT.</title><link>https://community.appian.com/discussions/f/user-interface/11652/sorting-a-paging-grid-column-that-is-a-nested-cdt</link><description>I have a paging grid and in one of the columns the data is from a nested cdt. While I am able to get the data portion I am unable to sort the column. I&amp;#39;ve tried using parentfield.childfield , using index function. What is the best or most simple way to</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Sorting a paging grid column that is a nested CDT.</title><link>https://community.appian.com/thread/106167?ContentTypeID=1</link><pubDate>Tue, 03 Jan 2023 09:07:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e03dbb69-1b9d-4579-be24-87aefb0177ce</guid><dc:creator>anandj281484</dc:creator><description>&lt;p&gt;You can sort nested cdt just by using todatasubset function.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1672736785963v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sorting a paging grid column that is a nested CDT.</title><link>https://community.appian.com/thread/60584?ContentTypeID=1</link><pubDate>Fri, 21 Sep 2018 20:10:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dcfd5c22-2995-4bb0-ba91-546344aa2c23</guid><dc:creator>Jim Schweitzer</dc:creator><description>Try putting an @OrderBy(&amp;quot;sortfield&amp;quot;) annotation on your XSD where you include the nested multiple. This will mean it&amp;#39;s always sorted that way, but that could be sufficient for your needs&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sorting a paging grid column that is a nested CDT.</title><link>https://community.appian.com/thread/58262?ContentTypeID=1</link><pubDate>Mon, 23 Jul 2018 20:11:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1c4a0c1c-79cc-4a22-8ff9-226b35f6d4c4</guid><dc:creator>yeswanththiyarir</dc:creator><description>As There are multiple values in each row, Appian doesn&amp;#39;t know which one to consider for sorting. &lt;br /&gt;
As far as I understood from what you said. Your data should look like this: &lt;br /&gt;
ID....contact&lt;br /&gt;
1....a,b,c,d,e&lt;br /&gt;
2....b,f,,h,j&lt;br /&gt;
&lt;br /&gt;
so now, if you want to sort by lastnames(a,b,c,d,e..) Appian is not sure which one to consider. When the &amp;#39;a&amp;#39; from id 1 is considered with &amp;#39;b&amp;#39; from id 2 the sorting will not be same as when &amp;#39;d&amp;#39; from id1 is considered with &amp;#39;b&amp;#39; from id2. &lt;br /&gt;
Sorting can be done on columns which have only one element per cell.&lt;br /&gt;
Hope this helps.&lt;br /&gt;
Yeswanth.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sorting a paging grid column that is a nested CDT.</title><link>https://community.appian.com/thread/58261?ContentTypeID=1</link><pubDate>Mon, 23 Jul 2018 20:07:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1d0486a1-c2b2-4633-a4e7-400203e20036</guid><dc:creator>harrisont606</dc:creator><description>How do you want sorting on a multiple field to work? What should it sort by?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sorting a paging grid column that is a nested CDT.</title><link>https://community.appian.com/thread/58260?ContentTypeID=1</link><pubDate>Mon, 23 Jul 2018 20:02:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:75569a8f-4b7f-4254-b85b-5566926c9d55</guid><dc:creator>rohann179</dc:creator><description>when i click on the sorting column it throws an error [contact.LastName] because it is a complex,multiple or child of a multiple data type.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sorting a paging grid column that is a nested CDT.</title><link>https://community.appian.com/thread/58259?ContentTypeID=1</link><pubDate>Mon, 23 Jul 2018 20:01:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:301387ed-3a16-4a50-977b-bbd9af9ea89f</guid><dc:creator>yeswanthr</dc:creator><description>So do you want to display sorted multiple last names in a single row?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sorting a paging grid column that is a nested CDT.</title><link>https://community.appian.com/thread/58258?ContentTypeID=1</link><pubDate>Mon, 23 Jul 2018 19:49:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:19f956b4-9933-4148-a15b-1ca5c7f4164f</guid><dc:creator>rohann179</dc:creator><description>it looks something like &lt;br /&gt;
Id-Int&lt;br /&gt;
Sponsid-Int&lt;br /&gt;
anumber-Int&lt;br /&gt;
Contact-Type(Contact)-Multiple&lt;br /&gt;
&lt;br /&gt;
The Sorting should happen on the Last name in the contact CDT&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sorting a paging grid column that is a nested CDT.</title><link>https://community.appian.com/thread/58257?ContentTypeID=1</link><pubDate>Mon, 23 Jul 2018 19:48:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4a84c2bf-5f27-4f9e-be5c-ce9b8b90be28</guid><dc:creator>rohann179</dc:creator><description>Multiple&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sorting a paging grid column that is a nested CDT.</title><link>https://community.appian.com/thread/58255?ContentTypeID=1</link><pubDate>Mon, 23 Jul 2018 19:28:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:87f618ef-2c47-4318-af4c-20e47a494231</guid><dc:creator>yeswanththiyarir</dc:creator><description>Try using the index and then dot notation if that child field is an array or else parent.child should work. I can address your issue more precisely if you can provide the exact CDT.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sorting a paging grid column that is a nested CDT.</title><link>https://community.appian.com/thread/58212?ContentTypeID=1</link><pubDate>Mon, 23 Jul 2018 02:22:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6f159e71-f873-417b-8dc1-26a92e60943e</guid><dc:creator>benjamins</dc:creator><description>&lt;p&gt;Create a dictionary from your nested CDT. Each column in the table is represented by an element in the dictionary.&lt;/p&gt;
&lt;p&gt;I would create a rule that takes in your nested CDT and then in the rule you have something like the following which returns back a dictionary:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;= {&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;a: ri!myCdt.a,&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ab: index(ri!myCdt.a, &amp;quot;b&amp;quot;, {})&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Then in your table you just reference the dictionary.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sorting a paging grid column that is a nested CDT.</title><link>https://community.appian.com/thread/58209?ContentTypeID=1</link><pubDate>Sun, 22 Jul 2018 20:12:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cda94d06-69ce-4398-ae1f-34309040b822</guid><dc:creator>harrisont606</dc:creator><description>Is the child CDT a single or a multiple?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sorting a paging grid column that is a nested CDT.</title><link>https://community.appian.com/thread/58189?ContentTypeID=1</link><pubDate>Fri, 20 Jul 2018 15:26:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f373be43-3669-4199-b6da-e87ccc402954</guid><dc:creator>rohann179</dc:creator><description>i tried with the dot notation and i am getting the following error cannot sort by field [contact.LastName] because it is a complex,multiple or child of a multiple data type.&lt;br /&gt;
&lt;br /&gt;
can you please let m e know if y have an answer&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sorting a paging grid column that is a nested CDT.</title><link>https://community.appian.com/thread/51350?ContentTypeID=1</link><pubDate>Thu, 04 Jan 2018 12:51:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ad81cf66-1d89-4218-93fb-cd1966e02e80</guid><dc:creator>Dastagiri Dudekula</dc:creator><description>dot notation can help.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sorting a paging grid column that is a nested CDT.</title><link>https://community.appian.com/thread/51344?ContentTypeID=1</link><pubDate>Thu, 04 Jan 2018 05:51:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e093f27e-e66f-40d5-a304-20857b38aae0</guid><dc:creator>Krishna Chaitanya</dc:creator><description>hi xingc,&lt;br /&gt;
is your nested cdt is single or array ?&lt;br /&gt;
if single,fetch your details by query rule,and convert id in todatasubset  with sorting filed of your childfield ,see below example &lt;br /&gt;
&lt;br /&gt;
todatasubset(&lt;br /&gt;
      rule!XYZ_empDetails(),&lt;br /&gt;
      a!pagingInfo(&lt;br /&gt;
        1,&lt;br /&gt;
        - 1,&lt;br /&gt;
        a!sortInfo(&lt;br /&gt;
          field: &amp;quot;parentfield.childfield&amp;quot;,&lt;br /&gt;
          ascending: false()&lt;br /&gt;
        )&lt;br /&gt;
      )&lt;br /&gt;
    ).data&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if you nested cdt is array better to create data base  view.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>