<?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 get type of string array</title><link>https://community.appian.com/discussions/f/data/25433/how-to-get-type-of-string-array</link><description>Hi, fairly new to appian and I&amp;#39;m trying to use type! to get the type value of a string array. I&amp;#39;m currently using typeof({&amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;}) which is working, but seems very clunky. I&amp;#39;m sure there&amp;#39;s a better way. Any help? Thanks!</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to get type of string array</title><link>https://community.appian.com/thread/99030?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 19:53:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6c31605d-8b0e-4843-9836-7e18ec10455c</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Similarly, &lt;em&gt;&lt;strong&gt;&amp;#39;type!Text?list&amp;#39;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get type of string array</title><link>https://community.appian.com/thread/99029?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 19:51:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:eb9494b6-075f-47b2-a63b-9a43e8295aaf</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;2 followup notes on this:&lt;/p&gt;
&lt;p&gt;1) the type name is case sensitive (&lt;strong&gt;&lt;em&gt;type!intger&lt;/em&gt;&lt;/strong&gt; won&amp;#39;t work, whereas &lt;strong&gt;&lt;em&gt;type!Integer&lt;/em&gt;&lt;/strong&gt; will)&lt;/p&gt;
&lt;p&gt;2) you can use the &amp;#39;?list&amp;#39; notation, but it requires to enclose the entire &amp;quot;type!..&amp;quot; call in single quotes - like this:&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/pastedimage1659642732982v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get type of string array</title><link>https://community.appian.com/thread/99020?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 15:17:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5ebf02d1-9e5d-4f1f-b9ba-1391f5030664</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;I misunderstood that you wanted the type value (103) instead of an empty string array.&amp;nbsp; I like Stefan&amp;#39;s answer then &lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Also for reference, if you want a quick way in your environment to see the type numbers in Appian (we use this in a COE/internal report), plug this into an empty interface.&amp;nbsp; Appian data types are ~1-300, CDTs begin at 500.&lt;/p&gt;
&lt;p&gt;Note, never apply the try() (or any other undocumented function) in production, although it would be nice to have, it is not supported currently and may be removed at any time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;a!richTextDisplayField(
  label: &amp;quot;Data Types&amp;quot;,
  value: {
    a!forEach(
      items: 1+enumerate(1500),
      expression: {
        a!richTextItem(
          text: concat(
            fv!item,
            &amp;quot; - &amp;quot;,
            /* do not use try() in production! */
            try(typename(fv!item),&amp;quot;&amp;quot;)
          )
        ),
        char(13)
      }
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get type of string array</title><link>https://community.appian.com/thread/99019?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 15:12:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0c6f52d2-84ff-4fbe-b8e0-4c2c065b5ee4</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;You are welcome :-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get type of string array</title><link>https://community.appian.com/thread/99018?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 15:11:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:729c0c1b-f24c-4b3e-8b4e-3619444bbe0d</guid><dc:creator>justinb5763</dc:creator><description>&lt;p&gt;perfect. thank you so much for your help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get type of string array</title><link>https://community.appian.com/thread/99017?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 15:08:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:132e93b9-a44b-4849-b10b-b2f76df0da15</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;yes&lt;/p&gt;
&lt;p&gt;Singular type: type!Text&lt;/p&gt;
&lt;p&gt;Plural type: type!Text?list or a!listType(type!Text)&lt;/p&gt;
&lt;p&gt;BTW, toInteger() etc. work with lists directly. For turning a list of Integers into a list of strings, use touniformstring().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get type of string array</title><link>https://community.appian.com/thread/99016?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 15:05:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:efa9ea5e-0a85-4743-9b05-1d944a597560</guid><dc:creator>justinb5763</dc:creator><description>&lt;p&gt;right, I guess that was really my question--what do I put after type! to get 103 back? or is that what you were saying in your other answer?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get type of string array</title><link>https://community.appian.com/thread/99014?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 15:04:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fbb1a1c4-d7d3-4d89-8066-144e6112661c</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;But keep in mind, that you can reference all Appian types using &amp;quot;type!&amp;quot;. I do not use any type numbers directly.&lt;/p&gt;
&lt;p&gt;type!Variant&lt;/p&gt;
&lt;p&gt;type!Text&lt;/p&gt;
&lt;p&gt;type!Map&lt;/p&gt;
&lt;p&gt;etc...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get type of string array</title><link>https://community.appian.com/thread/99013?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 15:02:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6efa684b-3873-4c0b-b097-37148aec846d</guid><dc:creator>justinb5763</dc:creator><description>&lt;p&gt;ah, this is awesome. thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get type of string array</title><link>https://community.appian.com/thread/99012?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 14:59:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d35a7493-7300-465c-ad07-481086058219</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;&lt;a href="https://docs.appian.com/suite/help/latest/api/constant-values.html"&gt;docs.appian.com/.../constant-values.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get type of string array</title><link>https://community.appian.com/thread/99011?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 14:59:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fede4d4e-9c9a-4a78-a8ac-e3dd18acc1be</guid><dc:creator>justinb5763</dc:creator><description>&lt;p&gt;where is the 103 from and what&amp;#39;s its significance?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get type of string array</title><link>https://community.appian.com/thread/99010?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 14:55:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6fd41d86-18f5-4c8c-8825-e2e2d288fb58</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;a!listType(type!Text)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get type of string array</title><link>https://community.appian.com/thread/99009?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 14:53:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6c12beb3-9be2-4588-b956-a05e526de715</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;I wouldn&amp;#39;t have any issues using that code in production, but if you want another way to do it, try:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;fn!cast(103,null)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>