I need to give an exit condition for an object in a report in which the field is text, I apply the following but it doesn't work:<<Calc(<<TABLE.Field>> = "4-MP.-blablablabla")>>It doesn't work for me either:(<<TABLE.Field>> = "4-MP.-blablablabla")because the following, which is what I really want, does not come out:in a -Column - Discrete Graphics us depth properties- ( Column - Discrete Graphics us depth properties)"Column" tab"Column Header Label" fieldIf the text string is "4-MP.-blablablabla" in the field I want, then put "ABC" as the field title, otherwise "A".I would like to implement the latter in the Column tab of the table, in which the expression to put would be more or less: IIf<<TABLE.Field>> = "4-MP.-blablablabla" OR <<TABLE.Field>> = "5-MR.-blablablabla", then it shows "ABC", otherwise, it shows "A" IIf<<TABLE.Field>> = "4-MP.-blablablabla" OR <<TABLE.Field>> = "5-MR.-blablablabla" then "ABC", IIF not, then "A"This field is defined as a library data lookup field or dropdown field. The table is called A and the library table is also called A, which is why I don't know if the query doesn't work out because of that.
I am not sure I understand exactly what you are trying to do. It is better to give a specific example including the data tables that are being used to drive the expression. I am hoping the following examples address your issue.
I understand that you are wanting to create a variable column heading in a log that depends on data contained in the project. The column heading operates at the point level so the solution will depend on the keyset of the table that contains the data you wish to use to make the decision on which header to display. I will provide 2 examples below.
Example 1 - Keyset of table with data = PointID
I have a data table named PointID that contains fields for PointID and Notes as shown in the picture below
Note that boring Alpha 1 has no data but boring Alpha 2 and B-1 have text that matches the ones we want to use to trigger a different column header. In this case the expression in the column header property of the report is pretty straight forward as shown in the picture below.
The results are as expected, for boring Alpha 1 without the trigger data the header displays as A as shown below
For Boring Alpha 2 with the trigger the output is ABC as shown below.
Example 2 - Keyset of table with data = PointID,Depth
If you are trying to use a field with a keyset of PointID,Depth, it becomes a bit more difficult.
For this example, suppose I have a table named Lithology With a keyset of PointID,Depth. It has fields for Depth and Remarks among other fields. Typical data for borings alpha 1 and alpha 2 are shown in the pictures below.
Note that alpha 2 has the trigger text at depth of 2 and alpha 1 has no trigger text.
In this case the trigger text could be at any depth (or multiple depths) in the table so you have to use an aggregate function that looks at all records in the table for the trigger text. There are many ways to do this, the example below uses the count function with the optional where clause. The expression for the report header is shown in the picture below.
In plain english, this counts the number of records in the remarks field that contain "4-MP", counts the number of records in the remarks field that contain "5-MR", adds the two together and if the sum is greater than 0 it triggers the "ABC" text. If not the default text of "A" is returned.
This returns the same results as provided for example 1 above.
There are many other possibilities and ways to do this. If the table with trigger data has other keysets than the two examples shown you will have to change the expression appropriately so that you search the appropriate records.
If this is not what you are trying to do, please provide a more specific example.
Will OpenGround be able to this, and all the other sophisticated "If this, then do that, but then on the other hand so something else" kinds of things?I am thinking that the data handling model of gINT was to allow the user to make decisions like this based on their review of the data, and to allow the decision to be made by code such as yours. I am thinking that the OG data model will be that the human intervenes to make the decision, and then manually inputs the desired data in the desired "slot".Am I thinking correct about this aspect of the OG data model?
Thank uoy Art. Really I´m near the answer but I don´t know If only a ",", or a ",_", or,... only one part of the strings I use doesn´t work. I tasted with a lot of combinations but I don´t arrive at the solution, maybe too thiks secuence can´t be built cause I call a field of a table that contains in that same field a drop-down from a table with the same name. This because? I really don't know, maybe this base was set up by someone before like this and didn't realize it could be cyclic path, I don't know. So, finally I will study another way for this.
Thanks a lot, really
Art, I do not know anything about open ground as I have never used it. Since I am retired, I do not have to face the prospect of migrating to open ground when bentley eventually stops supporting gint so I have no motivation to educate myself on it. Perhaps this question needs to be posted in the open ground forum.
Hi Art, yes OpenGround allows for conditional logic. Expressions can be used in the model itself (calculated fields), report templates, and other workflows to make decisions automatically.