<?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>[BM V8i SS4] SQL command controled by GUI toggle (operation feature)?</title><link>https://communities.bentley.com/products/geospatial/desktop/f/bentley-map-forum/176062/bm-v8i-ss4-sql-command-controled-by-gui-toggle-operation-feature</link><description>Hi, 
 I have Bentley Map project, XFM features in DGN with mslinks to SQL Server 2014 (hybrid DGN + DB project). 
 Source problem is that I need to place a feature (cell) in two different modes: 
 
 When feature is placed, a new row is created in SQL</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: [BM V8i SS4] SQL command controled by GUI toggle (operation feature)?</title><link>https://communities.bentley.com/thread/509384?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2019 05:53:10 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:9d585065-c97c-4fe7-8d63-03e1c2dcd184</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Crhis,&lt;/p&gt;
&lt;p&gt;thanks a lot for your asnwer, I will study it and will let you know whether it works and can be used in the project.&lt;/p&gt;
&lt;p&gt;In parallel I have discussed with the customer an option to split the table into two separate, one to be linked from DGN and second to be used by another application.&lt;/p&gt;
&lt;p&gt;With regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [BM V8i SS4] SQL command controled by GUI toggle (operation feature)?</title><link>https://communities.bentley.com/thread/509335?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 22:18:34 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:2f1d2c0f-fa67-48e4-8c63-9018daed007d</guid><dc:creator>cdalesandro</dc:creator><description>&lt;p&gt;Hello Jan,&lt;/p&gt;
&lt;p&gt;Try using a feature property instead of an operation property for the SQL statement criteria.&lt;/p&gt;
&lt;p&gt;In the attached simple example, a feature combo box property with a SQL domain list allows selection of an existing record. I ran this example with Map Connect.&lt;/p&gt;
&lt;p&gt;After starting Widget placement, the user may enter a new Widget name or choose an existing Widget name from a combo box.&amp;nbsp;&amp;nbsp; The combo box is defined by a feature property &amp;ldquo;ExistingRowId&amp;rdquo; which has a SQL domain list. Note that I manually edited the XFM schema to set &amp;ldquo;ExistingRowId&amp;rdquo; property with attribute dbProp=&amp;rdquo;true&amp;rdquo; since the toggle button is read-only in the Geospatial Administrator user interface. I set this attribute so that the property is not written to the design file with the feature instance.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If &amp;ldquo;ExistingRowId&amp;rdquo; property has a value, then the insert statements are not executed and the DB linkage is built using the existing row mslink value.&lt;/p&gt;
&lt;p&gt;If &amp;ldquo;ExistingRowId&amp;rdquo; property does not have a value, then the insert statements are executed and the DB linkage is built using the next available mslink value.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&amp;lt;insertList&amp;gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&amp;lt;insert&amp;nbsp;useCriteria=&amp;quot;!strlen(&amp;amp;quot;[ExistingRowId]&amp;amp;quot;)&amp;quot;&amp;gt;INSERT&amp;nbsp;INTO&amp;nbsp;widget&amp;nbsp;(MSLINK,name)&amp;nbsp;VALUES&amp;nbsp;([widgetMslink=XFMNextMslink("widget")],&amp;#39;[name|NULL]&amp;#39;)&amp;lt;/insert&amp;gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;lt;insert&amp;nbsp;useCriteria=&amp;quot;!strlen(&amp;amp;quot;[ExistingRowId]&amp;amp;quot;)&amp;nbsp;&amp;amp;amp;&amp;amp;amp;&amp;nbsp;XFMIsAutoCommitOff()&amp;quot;&amp;gt;COMMIT&amp;lt;/insert&amp;gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&amp;lt;/insertList&amp;gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&amp;lt;dbLinkList&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;lt;dbLink&amp;nbsp;table=&amp;quot;widget&amp;quot;&amp;nbsp;linkType=&amp;quot;OLEDB&amp;quot;&amp;nbsp;infoProp=&amp;quot;false&amp;quot;&amp;nbsp;useCriteria=&amp;quot;!strlen(&amp;amp;quot;[ExistingRowId]&amp;amp;quot;)&amp;quot;&amp;gt;[widgetMslink]&amp;lt;/dbLink&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;lt;dbLink&amp;nbsp;table=&amp;quot;widget&amp;quot;&amp;nbsp;linkType=&amp;quot;OLEDB&amp;quot;&amp;nbsp;infoProp=&amp;quot;false&amp;quot;&amp;nbsp;useCriteria=&amp;quot;strlen(&amp;amp;quot;[ExistingRowId]&amp;amp;quot;)&amp;quot;&amp;gt;[ExistingRowId]&amp;lt;/dbLink&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;lt;/dbLinkList&amp;gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;a href="https://communities.bentley.com/cfs-file/__key/communityserver-discussions-components-files/5924/existingDBRecord.zip"&gt;communities.bentley.com/.../existingDBRecord.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Chris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [BM V8i SS4] SQL command controled by GUI toggle (operation feature)?</title><link>https://communities.bentley.com/thread/509219?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 11:16:42 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:cfa56873-5bee-42c5-9c5d-539ee56d79a1</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Just a thought: Maybe SQL statements are cached when project is loaded and at this time the operation feature has no value and no criterion is evaluated as valid, and when the placement command is restarted, SQLs are not reevaluated?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>