[BM V8i SS4] SQL command controled by GUI toggle (operation feature)?


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 Server database. It's deafult mode and it works fine.
  • More often, the record is created using form application and not from BM, so the row exists already. In such case, I need to place cell and to set DB connection (mslink) to existing record. It seems to be a problem.

Is anybody aware of some simple solution?

After some testing, I want to try an idea to have two different Insers SQL commands, one original with INSERT (new row is created) and second with UPDATE. They would be controlled by Criteria what SQL command will be sent to database.

Unfortunately I am not able to test this approach, because I am not able to find a way how to control the queries and select one only.

The project is huge and requires specifically configured dabase, but what I did in a simplified and anonymized form:

  • There is operation property "InsertNewRecord"
  • The property is inserted into Place feature dialog
  • The feature is set accordingly to this older discussion I found.
  • I can see in XFM debug output that the property is set properly True or False
  • I have also criteria defined as COMPARE("[MyFeature/InsertNewRecord]", "True", "") and also opposite one.
  • These criterias are used in feature SQL Statements > Inserts.

Now the situation is that no SQL command is sent to database, so it seems both criteria are evaluated as not valid.

Is it possible to test somehow whether the problem is in the criteria (e.g. wrongly defined) or e.g. it's bug when criterion using operation feature is set for SQL statement, it's not evaluated?

With regards,