<?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 check validity of icon? Rich text icon?</title><link>https://community.appian.com/discussions/f/user-interface/20285/how-to-check-validity-of-icon-rich-text-icon</link><description>Short of creating a constant that contains all valid icons and richTextIcons (which is suboptimal given that icons are updated between Appian versions), is there a way to make icons &amp;quot;invalid icon&amp;quot;-safe? 
 i.e. Checking if an icon is in the list of supported</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to check validity of icon? Rich text icon?</title><link>https://community.appian.com/thread/79145?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2021 22:36:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:91a535f1-6cfc-4b50-850a-3270c1d5ff44</guid><dc:creator>Ruslan Ardashev</dc:creator><description>&lt;p&gt;Completely agreed regarding undocumented functionality. Thank you for the quick response!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to check validity of icon? Rich text icon?</title><link>https://community.appian.com/thread/79141?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2021 19:10:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c05ecda5-08fe-4abe-aef0-1cb97e2a7164</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I didn&amp;#39;t actually know this before, but after a quick test in my environment I&amp;#39;ve found that when an invalid icon name is provided, a!richTextIcon() will return a dictionary of data wherein one of the properties is &amp;quot;isError&amp;quot; and a value of &amp;quot;true&amp;quot;.&lt;/p&gt;
&lt;p&gt;This leads me to think that if you have a strong enough use case for this, you could set up an expression rule i.e. &amp;quot;MYAPP_Util_isValidIconName()&amp;quot; where you pass in the name and it returns TRUE if the result was valid and FALSE otherwise... it seems to execute pretty quickly.&amp;nbsp; Note this would be technically &amp;quot;unsupported&amp;quot; functionality meaning the back-end workings could change in the future with no notice, hence why I recommend only doing this if you have a strong reason for it, and wrapping the functionality in an expression rule and only using that (instead of hardcoding it in).&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;if(
  property(a!richTextIcon(icon: ri!iconName), &amp;quot;isError&amp;quot;, false()),
  false(),
  true()
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>