<?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>Access CDT field Names ....</title><link>https://community.appian.com/discussions/f/general/13063/access-cdt-field-names</link><description>Lets say I have a CDT of 5 Fields that get populated. I&amp;#39;d like to create a grid that displays both the field name and the value. (A graphical representation of the CDT if you like). i.e TEST CDT 
 FieldA Value1 FieldB Value2 FieldC Value3 FieldD Value4</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Access CDT field Names ....</title><link>https://community.appian.com/thread/59061?ContentTypeID=1</link><pubDate>Mon, 13 Aug 2018 04:46:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:113205fb-c901-4faa-b5ed-ffab09df308e</guid><dc:creator>komalc3</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/pauls0003"&gt;pauls0003&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Try out the below code, it will help you.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;load(
  local!extractFieldsFromCDTExceptField1:trim(extract(tostring(ri!myType),&amp;quot;,&amp;quot;,&amp;quot;=&amp;quot;)),
  local!extractField1FromCDT:replace(extract(&amp;quot;,&amp;quot;&amp;amp;tostring(ri!myType),&amp;quot;,&amp;quot;,&amp;quot;=&amp;quot;).[1],1,1,&amp;quot;&amp;quot;),
  append(
    {},
    local!extractField1FromCDT,
    local!extractFieldsFromCDTExceptField1
  )
)

/*Here make ri!myType of type Any Type*/&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Access CDT field Names ....</title><link>https://community.appian.com/thread/58856?ContentTypeID=1</link><pubDate>Tue, 07 Aug 2018 14:35:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2cc2f0cd-4e97-47d2-9bdb-a3d696666679</guid><dc:creator>bradc</dc:creator><description>&lt;p&gt;Hi Paul,&lt;/p&gt;
&lt;p&gt;I believe the below code example will return exactly what you&amp;#39;re looking for.&amp;nbsp; Just match the type!MyCDT() with the type from your input and give your input some data&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;= load(
  local!CDTFields: split(
    stripwith(
      tostring(
        &amp;#39;type!MyCDT&amp;#39;()
      ),
      &amp;quot;=[] &amp;quot;
    ),
    &amp;quot;,&amp;quot;
  ),
  {
    a!paragraphField(
      value: local!CDTFields
    ),
    a!gridField(
      totalCount: length(
        ri!CDT
      ),
      columns: a!forEach(
        items: local!CDTFields,
        expression: a!gridTextColumn(
          label: fv!item,
          field: fv!item,
          data: index(
            ri!CDT,
            fv!item,
            null
          )
        )
      ),
      value: a!pagingInfo(
        startIndex: 1,
        batchSize: - 1
      )
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Access CDT field Names ....</title><link>https://community.appian.com/thread/58851?ContentTypeID=1</link><pubDate>Tue, 07 Aug 2018 13:58:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:090521d9-231d-44b0-807f-c664ff3078d2</guid><dc:creator>josep</dc:creator><description>Nice solution Mikel!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Access CDT field Names ....</title><link>https://community.appian.com/thread/58849?ContentTypeID=1</link><pubDate>Tue, 07 Aug 2018 13:30:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:af9cf49c-7296-49ab-af55-8b85f6dd4734</guid><dc:creator>MikelG</dc:creator><description>Hi!&lt;br /&gt;
&lt;br /&gt;
I think you could use something like this:&lt;br /&gt;
&lt;br /&gt;
load(&lt;br /&gt;
  local!test:&amp;#39;type!My_Type&amp;#39;(),&lt;br /&gt;
  local!pasoatext:cast(103,local!test),&lt;br /&gt;
  local!split: split(local!pasoatext,&amp;quot;=&amp;quot;),&lt;br /&gt;
  local!split  &lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
It isnt totally correct but I think It will give you an idea of how to proceed :)&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
Mikel&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Access CDT field Names ....</title><link>https://community.appian.com/thread/58843?ContentTypeID=1</link><pubDate>Tue, 07 Aug 2018 12:57:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:95f80735-fa78-427a-b028-2e8db84abffe</guid><dc:creator>josep</dc:creator><description>You can loop the for each passing an array of strings of the field names. And using index function &lt;br /&gt;
&lt;br /&gt;
Something like this &lt;br /&gt;
Foreach(&lt;br /&gt;
Items:{“fieldA”, “fieldB”...&lt;br /&gt;
Expression:Index(ri!cdt, fv!item, “”)&lt;br /&gt;
...&lt;br /&gt;
(Sorry for the expression is just to give you an idea )&lt;br /&gt;
&lt;br /&gt;
If you want it dynamic, there is in the shared folder some plugin that gets you the names. &lt;br /&gt;
&lt;br /&gt;
The following plugin has a function that gives you that. &lt;br /&gt;
&lt;a href="https://forum.appian.com/suite/sites/shared-components/page/shared-components/record/lMBCLGOdlMUpdGVqW3dQaIKmclBmvvNEj8vu_cjb7T-5YiPr4Fu8ly5Yj1s09uenE4RYzA8zKyx7eiUh-ynLnNajSjWskhlHOMv_Hc0iLlJjBHhkg/view/summary"&gt;forum.appian.com/.../summary&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Jose&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Access CDT field Names ....</title><link>https://community.appian.com/thread/58842?ContentTypeID=1</link><pubDate>Tue, 07 Aug 2018 12:56:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5cf53391-ce84-4de7-81ed-e0b7a72967ed</guid><dc:creator>Dylan Salopek</dc:creator><description>I am not sure that this exists in Appian, however CDT field names are static. You should use grid headers for the field name and data as the rows though, as this is very easily implemented in Appian. &lt;br /&gt;
&lt;br /&gt;
Refer to this page for more information:&lt;br /&gt;
&lt;a href="https://docs.appian.com/suite/help/18.2/Paging_Grid_Component.html"&gt;docs.appian.com/.../Paging_Grid_Component.html&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>