<?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>Hide interface field if it has a null value</title><link>https://community.appian.com/discussions/f/user-interface/23980/hide-interface-field-if-it-has-a-null-value</link><description>If a variable does not have a value save into it how do you hide it in the interface? This was my attempt at it using the showWhen variable: a!dateField( label: &amp;quot;Tier 2 Findings&amp;quot;, labelPosition: &amp;quot;ABOVE&amp;quot;, value: ri!svcRequest.tier_two_date, saveInto: </description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Hide interface field if it has a null value</title><link>https://community.appian.com/thread/92350?ContentTypeID=1</link><pubDate>Thu, 17 Mar 2022 06:36:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8d116756-8b3c-4f24-a3ab-36cf5e994965</guid><dc:creator>snbanavath</dc:creator><description>&lt;p&gt;I hope You found a way to conditionally show a UI component.&lt;br /&gt;&lt;br /&gt;Incase if you don&amp;#39;t have &amp;quot;showWhen&amp;quot; parameter for a certain component, then can you wrap the entire UI component which you want to hide conditionally in an if() function.&lt;br /&gt;&lt;br /&gt;if(&lt;/p&gt;
&lt;p&gt;a!isNullOrEmpty(&lt;span&gt;ri!svcRequest.tier_two_date),&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;{},&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;a!dateField(&lt;br /&gt;label: &amp;quot;Tier 2 Findings&amp;quot;,&lt;br /&gt;labelPosition: &amp;quot;ABOVE&amp;quot;,&lt;br /&gt;value: ri!svcRequest.tier_two_date,&lt;br /&gt;saveInto: {},&lt;br /&gt;readOnly: true,&lt;br /&gt;validations: {}&lt;br /&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Assume that the a!dateField has no &amp;quot;showWhen&amp;quot; parameter.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hide interface field if it has a null value</title><link>https://community.appian.com/thread/92347?ContentTypeID=1</link><pubDate>Thu, 17 Mar 2022 05:27:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f7023d5e-0257-4754-8bec-4b646ec19f45</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Another faster way to convert a null into false can be to wrap the variable in &amp;#39;or()&amp;#39; function.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hide interface field if it has a null value</title><link>https://community.appian.com/thread/92340?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2022 19:21:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:12baaf9f-92d2-42f6-b491-ee8ae84ef902</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;showWhen requires a boolean response (or null, in which case it defaults to &amp;quot;true&amp;quot;).&amp;nbsp; You seem to have this covered as your if() statement is configured to return a boolean value itself.&lt;/p&gt;
&lt;p&gt;However, your original if() statement is not really configured correctly in its first parameter.&amp;nbsp; The first parameter of an if() statement is expecting something that will evaluate as either TRUE or FALSE.&amp;nbsp; But for some reason you&amp;#39;ve passed in &amp;quot;ri!svcRequest.tier_two_date&amp;quot; - which would either return the date value (i assume), or blank.&amp;nbsp; Neither of those is a TRUE or FALSE value.&amp;nbsp;  already provided you the answer to this next step, which is to actually do a null check on your date field, which will return the necessary TRUE or FALSE value - I just wanted to be sure you understand why this is needed instead of what you&amp;#39;ve done.&lt;/p&gt;
&lt;p&gt;Then as a final step: although an if() statement is useful in many, many cases - in a time like this you don&amp;#39;t really need it.&amp;nbsp; You could simply set your showWhen parameter to a statement that evaluates to true/false itself.&amp;nbsp; In this case we would utilize the new &amp;quot;a!isNotNullOrEmpty()&amp;quot; function.&amp;nbsp; The end result would look like this:&lt;br /&gt;&lt;pre class="ui-code" data-mode="java"&gt;showWhen:a!isNotNullOrEmpty(ri!svcRequest.tier_two_date)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hide interface field if it has a null value</title><link>https://community.appian.com/thread/92337?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2022 17:20:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b6d3a627-ddff-49b4-9ea7-47e0a6be1c69</guid><dc:creator>oludareo0002</dc:creator><description>&lt;p&gt;its for the summary view of a pervious application&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hide interface field if it has a null value</title><link>https://community.appian.com/thread/92333?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2022 15:46:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e2b29ec7-a574-4e3b-a64a-48f1360fc25c</guid><dc:creator>GopalK</dc:creator><description>&lt;p&gt;If you want to make any field hidden then definitely you can use showWhen parameter. Something like below,&lt;/p&gt;
&lt;p&gt;If(&lt;/p&gt;
&lt;p&gt;a!isNullOrEmpty(ri!svcRequest.tier_two_date),&lt;/p&gt;
&lt;p&gt;false,&lt;/p&gt;
&lt;p&gt;true&lt;/p&gt;
&lt;p&gt;)&lt;/p&gt;
&lt;p&gt;But why you don&amp;#39;t have anything in save into ? What was the use case?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>