<?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 can I convert expression?</title><link>https://community.appian.com/discussions/f/new-to-appian/28312/how-can-i-convert-expression</link><description>How do I convert the above code, this part: 
 expression: a!gridColumn( label: fv!item, value: index(fv!row, fv!item, &amp;quot;&amp;quot;) ) 
 To something like: 
 a!gridColumn( label: &amp;quot;Note&amp;quot;, value: index(fv!row, &amp;quot;Note&amp;quot;, &amp;quot;&amp;quot;) ), 
 a!gridColumn( label: &amp;quot;Name&amp;quot;, value: index</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How can I convert expression?</title><link>https://community.appian.com/thread/110732?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2023 14:36:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:16a263b5-9958-4b3a-a2fa-43fa829e17d2</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="91576" url="~/discussions/f/new-to-appian/28312/how-can-i-convert-expression/110711#110711"]by using the Keys function I get all of the keys, which I do not want.[/quote]
&lt;p&gt;There was no way of telling this was a constraint from your original post.&amp;nbsp; Therefore it might be better if you actually talk about your requirements in general, instead of posting a short snippet with no context and expecting us to guess at the details you didn&amp;#39;t happen to share originally.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I convert expression?</title><link>https://community.appian.com/thread/110713?ContentTypeID=1</link><pubDate>Thu, 06 Apr 2023 21:12:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b52a6d5f-e1ae-4c39-9d1b-4406a00f7148</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;That&amp;#39;s fair, but if you&amp;#39;re explicitly choosing certain fields, I think it&amp;#39;s easier to just define them yourself. Instead of using a!keys, just put a list with the fields you plan to display.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I convert expression?</title><link>https://community.appian.com/thread/110712?ContentTypeID=1</link><pubDate>Thu, 06 Apr 2023 20:50:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:02967387-6b31-42b1-8447-1a70154d83f5</guid><dc:creator>Jes&amp;#250;s Hormigos</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  /* Example */
  local!data: {
    a!map(Note: &amp;quot;Note1&amp;quot;, Name: &amp;quot;Name1&amp;quot;, Field: 123),
    a!map(Note: &amp;quot;Note2&amp;quot;, Name: &amp;quot;Name2&amp;quot;, Field: 123)
  },
  local!fields: { &amp;quot;Note&amp;quot;, &amp;quot;Name&amp;quot; }, /* Fields required */
  a!gridField(
    data: local!data,
    columns: a!forEach(
      items: local!fields,
      expression: a!gridColumn(
        label: fv!item,
        value: index(fv!row, fv!item, &amp;quot;&amp;quot;)
      )
    )
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Please, test it and let me know if this solve your problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I convert expression?</title><link>https://community.appian.com/thread/110711?ContentTypeID=1</link><pubDate>Thu, 06 Apr 2023 20:48:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ffa680d6-49a1-41a8-a273-889c6b0a73f2</guid><dc:creator>petel0001</dc:creator><description>&lt;p&gt;However, by using the Keys function I get all of the keys, which I do not want.&lt;br /&gt;Using your example I&amp;#39;ve added a description key, I do not want that key to be displayed.&lt;br /&gt;In the local!data I also have the primary key value for the record, not too useful fore the end user either.&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!data: {
    a!map(note: &amp;quot;Sample Note&amp;quot;, name: &amp;quot;Sample Name&amp;quot;, description: &amp;quot;i am a description&amp;quot;),
    a!map(note: &amp;quot;Sample Note 2&amp;quot;, name: &amp;quot;Sample Name 2&amp;quot;, description: &amp;quot;&amp;quot;),
  },
  a!gridField(
    data: local!data,
    columns: a!forEach(
      items: a!keys(index(local!data, 1, {})),
      expression: a!gridColumn(
        label: fv!item,
        value: index(fv!row, fv!item, &amp;quot;&amp;quot;)
      )
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I convert expression?</title><link>https://community.appian.com/thread/110710?ContentTypeID=1</link><pubDate>Thu, 06 Apr 2023 20:42:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1c4b574a-dbc4-4bb1-8dc4-54300cac63c3</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;You probably want to use the a!keys() function. Here&amp;#39;s an example:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!data: {
    a!map(note: &amp;quot;Sample Note&amp;quot;, name: &amp;quot;Sample Name&amp;quot;),
    a!map(note: &amp;quot;Sample Note 2&amp;quot;, name: &amp;quot;Sample Name 2&amp;quot;),
  },
  a!gridField(
    data: local!data,
    columns: a!forEach(
      items: a!keys(index(local!data, 1, {})),
      expression: a!gridColumn(
        label: fv!item,
        value: index(fv!row, fv!item, &amp;quot;&amp;quot;)
      )
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>