<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>How to use IIF Condition in EC Expression to Cater multiple Null</title><link>https://communities.bentley.com/products/plant/w/plant_design_and_engineering__wiki/59731/how-to-use-iif-condition-in-ec-expression-to-cater-multiple-null</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>How to use IIF Condition in EC Expression to Cater multiple Null</title><link>https://communities.bentley.com/products/plant/w/plant_design_and_engineering__wiki/59731/how-to-use-iif-condition-in-ec-expression-to-cater-multiple-null</link><pubDate>Wed, 11 May 2022 10:48:55 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:b95ae1c7-4be3-4576-a2e7-d9a1bd474cb7</guid><dc:creator>Deepak Singh</dc:creator><comments>https://communities.bentley.com/products/plant/w/plant_design_and_engineering__wiki/59731/how-to-use-iif-condition-in-ec-expression-to-cater-multiple-null#comments</comments><description>Current Revision posted to OpenPlant | AutoPLANT Wiki by Deepak Singh on 5/11/2022 10:48:55 AM&lt;br /&gt;
&lt;h1&gt;&lt;b&gt;&lt;img alt=" " src="/resized-image/__size/182x54/__key/communityserver-wikis-components-files/00-00-00-00-43/pastedimage1524216352232v1.png" /&gt;&lt;br /&gt;&lt;/b&gt;&lt;/h1&gt;
&lt;table style="background-color:#dce5f0;border:0px solid #dce5f0;height:161px;width:426px;" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;b&gt;Applies To&amp;nbsp;&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Product(s):&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;OpenPlant Modeler CONNECT Edition&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Version(s):&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;10.10.00.72&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Environment:&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Windows 10 (64-bit)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Area:&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;OpenPlant Project Administrator&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Subarea:&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Schema Customization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Original Author:&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Deepak Singh, Bentley Product Advantage Group&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Background&lt;/h3&gt;
&lt;p&gt;There is a requirement to generate an ec expression that validate the multiple nulls for a tag expression. In this wiki article, we will learn the possible customization that is required to achieve.&lt;/p&gt;
&lt;h3&gt;Steps to Accomplish&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Load &lt;strong&gt;OpenPlant Project Administrator CONNECT Edition&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Expand the workset and select desired associated application, in this case OpenPlant Modeler.&lt;/li&gt;
&lt;li&gt;From ribbon tab, select &lt;strong&gt;Settings &amp;gt; Expression Editor&amp;nbsp;&lt;/strong&gt;as shown below.&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="/resized-image/__size/620x620/__key/communityserver-wikis-components-files/00-00-00-00-43/2818.D1.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;This will load &lt;strong&gt;Expression Editor&lt;/strong&gt; dialog. Search for desired class name and pick the property. In this case, &lt;strong&gt;Pipeline&lt;/strong&gt; as class and &lt;strong&gt;NAME&lt;/strong&gt; as property has been selected.&lt;/li&gt;
&lt;li&gt;For writing the EC Expression the criteria has been assumed where Tracing and Insulation thickness can be NULL. Please note that here Tracing is a string type property whereas Insulation Thickness is a double type property.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;EC Expression:&lt;/strong&gt; this.UNIT &amp;amp; this.NUMBER &amp;amp; &amp;quot;-&amp;quot; &amp;amp; this.NOMINAL_DIAMETER &amp;amp; this.SPECIFICATION &amp;amp; IIF(this.INSULATION_THICKNESS&amp;gt;0,&amp;quot;-&amp;quot; &amp;amp; this.INSULATION_THICKNESS &amp;amp; this.INSULATION, &amp;quot;&amp;quot;) &amp;amp; IIF(System.String.Length(this.TRACING)&amp;gt;0,&amp;quot;-&amp;quot; &amp;amp; this.TRACING, &amp;quot;&amp;quot;)&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="/resized-image/__size/1200x960/__key/communityserver-wikis-components-files/00-00-00-00-43/3441.D34.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;Notice that System.String.Length has been used where property data type is of string type. It is not required where property data type is of double type.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;Validate the expression and save the changes.&lt;/li&gt;
&lt;li&gt;Click on OK and close OpenPlant Project Administrator.&lt;/li&gt;
&lt;li&gt;Load OpenPlant Modeler, create a new pipeline name based on requirement and verify the result.&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="/resized-image/__size/750x750/__key/communityserver-wikis-components-files/00-00-00-00-43/7608.D435.jpg" /&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;See Also&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://communities.bentley.com/products/plant/w/plant_design_and_engineering__wiki/58977/how-to-preserve-original-number-value-upon-paste-of-components-in-openplant-modeler-connect-edition"&gt;communities.bentley.com/.../how-to-preserve-original-number-value-upon-paste-of-components-in-openplant-modeler-connect-edition&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: OpenPlant Modeler, System.String.Length, OpenPlant Modeler CONNECT edition, Expression Editor, &gt;0 in EC Expression, Schema Editor, NULL in EC Expression, OpenPLANT Project Administrator&lt;/div&gt;
</description></item></channel></rss>