<?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/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Can I make my Fence Legend Smart?</title><link>https://communities.bentley.com/products/geotechnical1/f/geotechnical-forum/240232/can-i-make-my-fence-legend-smart</link><description>I have a fence legend where I have rock and soil showing, as well as different groundwater level symbols. I would like some parts of the legend to disappear if not applicable to the fence. For example, if just one boring has a &amp;lt;&amp;lt;TABLE.Field&amp;gt;&amp;gt; populated</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Can I make my Fence Legend Smart?</title><link>https://communities.bentley.com/thread/748525?ContentTypeID=1</link><pubDate>Mon, 09 Jan 2023 04:51:21 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:4afcf173-3a06-4f79-816b-732488ab1691</guid><dc:creator>szang</dc:creator><description>&lt;p&gt;If you have items that you do not want to display based on the presence or absence of data in a specific field for ALL the borings being output to a fence you need to use an sql command with an IN clause consisting of a list of the borings being output.&amp;nbsp; Fortunately, gINT has data items that help you create that IN clause.&amp;nbsp; For example, if I have a text entity that defines what SPT N means in a legend, and I do not want that entity to display if there are no SPT N values on the fence, I can place the following expression in the output condition of the text entity.&lt;/p&gt;
&lt;p&gt;&amp;lt;&amp;lt;IIf(_&lt;br /&gt;&amp;nbsp; &amp;lt;&amp;lt;Sql(_&lt;br /&gt;&amp;nbsp; &amp;nbsp; Select Count([SAMPLE].[Blows_1st_6in]) _&lt;br /&gt;&amp;nbsp; &amp;nbsp; FROM [SAMPLE] _&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHERE [SAMPLE].[PointID] IN (&amp;lt;&amp;lt;OutputKeysInClause&amp;gt;&amp;gt;)_&lt;br /&gt;&amp;nbsp; )&amp;gt;&amp;gt; = 0,_&lt;br /&gt;&amp;nbsp; False,_&lt;br /&gt;&amp;nbsp; True_&lt;br /&gt;)&amp;gt;&amp;gt;&lt;/p&gt;
&lt;p&gt;The OutputKeysInClause function generates a list of the borings selected for output ie &amp;#39;B-1&amp;#39;,&amp;#39;B-2&amp;#39;,&amp;#39;B-3&amp;#39;. Thus the SQL command will count all the values in the field Blows_1st_6in for the PointID&amp;#39;s of B-1, B-2, and B-3. If none of those borings have any entries for&amp;nbsp;&lt;span&gt;Blows_1st_6in, the returned count will be zero.&amp;nbsp; The IIf statement compares the count to zero and if it is equal to zero it returns logical False and the entity does not print. Else it returns logical True.&amp;nbsp; This is sort of a more complicated &amp;lt;&amp;lt;HasData&amp;gt;&amp;gt; function.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You will have to modify as required for what you actually want to do.&amp;nbsp; Be careful&amp;nbsp;with syntax&amp;nbsp;in the sql command.&amp;nbsp; Some items require SQL formatting&amp;nbsp;for the table and field and some require gINT&amp;nbsp;&lt;/span&gt;formatting.&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I make my Fence Legend Smart?</title><link>https://communities.bentley.com/thread/748474?ContentTypeID=1</link><pubDate>Sat, 07 Jan 2023 09:17:07 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:ede01c91-72f2-4b85-a782-9fc8e4cf98da</guid><dc:creator>Phil Wade</dc:creator><description>&lt;p&gt;The legend object is great for the standard requirements, but once you need something else it generally can&amp;#39;t do it.&amp;nbsp; I&amp;#39;ve had to write my own legend blocks, with polyline boxes, expressions for fill and out put conditions etc and text entities.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>