<?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>Function to find the data type of a constant?</title><link>https://community.appian.com/discussions/f/rules/13522/function-to-find-the-data-type-of-a-constant</link><description>Is there a function which can give the data type of a constant? The function &amp;quot;getcontentdetailsbyuuid&amp;quot; doesn&amp;#39;t provide that information. 
 
 Use Case: 
 I want to build a UI for the business users to manage few constants. The UI should dynamically display</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Function to find the data type of a constant?</title><link>https://community.appian.com/thread/115164?ContentTypeID=1</link><pubDate>Tue, 27 Jun 2023 21:23:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dfa74cf9-14d0-4702-ab1d-89115e7491a3</guid><dc:creator>JJ</dc:creator><description>&lt;p&gt;Never mind, I answered my own question. I can just get the&lt;strong&gt; fn!typeOf(fv!item)&lt;/strong&gt; where fv!item is the VALUE of the constant.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Function to find the data type of a constant?</title><link>https://community.appian.com/thread/115163?ContentTypeID=1</link><pubDate>Tue, 27 Jun 2023 21:20:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2f9aefb0-c72d-4548-b088-636dd69a5d2e</guid><dc:creator>JJ</dc:creator><description>&lt;p&gt;Is there a way to do this with a list of type &amp;quot;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;Content Constant&amp;quot;? &lt;br /&gt;&lt;br /&gt;Basically I have a list of data about constants and I want to get the type of each. I tried &lt;strong&gt;fn!typeOf(&amp;quot;cons!&amp;quot; &amp;amp; fv!item)&lt;/strong&gt; where fv!item is the constant&amp;#39;s name. That just returned text for everything since it&amp;#39;s technically text.&amp;nbsp; I tried &lt;strong&gt;fn!typeOf(fv!item)&lt;/strong&gt; where fv!item is the constant itself and it returns &amp;quot;Content Constant&lt;strong&gt;&amp;quot;&amp;nbsp;&lt;/strong&gt;for everything since they are constants (instead of telling the type of data the constant holds).&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;I am getting the constants with the Content Tools plugin and this code:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&lt;em&gt;local!constants: a!flatten(&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp; a!forEach(&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp; &amp;nbsp; items: ri!constantFolders,&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp; &amp;nbsp; expression: fn!getconstantsfromfolder(&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; rootFolder: fv!item,&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; recursiveSearch: true&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp; &amp;nbsp; )&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp; )&lt;/em&gt;&lt;br /&gt;&lt;em&gt; )&lt;/em&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;Thank you!&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Function to find the data type of a constant?</title><link>https://community.appian.com/thread/61427?ContentTypeID=1</link><pubDate>Wed, 10 Oct 2018 18:23:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0f467963-843b-4c2f-9219-27fb03b75065</guid><dc:creator>madhanka</dc:creator><description>That was exactly what I was looking for. Thank you so much&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Function to find the data type of a constant?</title><link>https://community.appian.com/thread/61426?ContentTypeID=1</link><pubDate>Wed, 10 Oct 2018 18:21:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:10109d7a-76c2-476e-b376-0e48ed89a8ef</guid><dc:creator>Robert Shankin</dc:creator><description>&lt;p&gt;Will this work for you?&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;fn!typeName(fn!typeOf(cons!YOUR_CONSTANT)) &lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>