12-14-2015 09:10 AM
In a data store (ASAM ODS) I would like to have an element display not only the description of the said element, but also a property of the parent. How do I do this?
For example: I have a "Measurement" entity that I would like to display a property from the measurments parent ("Run"). So, I want the navigator to display: "Measurement("Description")_Run("TestRunNumber")".
It does not appear I can do this with a browse configuration file, so how do I set the browse settings using the Browse Settings object? All I can seem to do is display the properties, not set them.
Thanks.
Solved! Go to Solution.
12-14-2015 09:36 AM
I don't know if this is related, but I cannot load browse settings either. I use the below script, but it doesn't change the data store browse settings. If I go to settings, then manually load the browse settings file, it works fine.
Dim oDataStore: Set oDataStore=Navigator.Display.CurrDataStore.GetDataStore
Dim oDatabaseBrowseSettings: Set oDatabaseBrowseSettings=Navigator.Settings.LoadBrowseSettings"MyFilePathandName.tbs",oDataStore)
Call oDataStore.SetBrowseSettings(oDatabaseBrowseSettings)
12-14-2015 11:00 AM
So, after lots and lots of poking, I seem to have found the problem. The method SetBrowseSettings is a method of both the CurrDataStore object and the GetDataStore object, but only one works. So, both of the below seem to be valid methods of the navigator object model, but only the second one actually sets browse settings. Is this a bug in Diadem or a bug in my understanding?
Call Navigator.Display.CurrDataStore.GetDataStore.SetBrowseSettings(oDatabaseBrowseSettings)
Call Navigator.Display.CurrDataStore.SetBrowseSettings(oDatabaseBrowseSettings)
I would still like to know how to have an element display name contain a property of the element itself and a property of the elements parent. That isn't yet clear to me.
12-15-2015 09:36 AM
Hi RussellSenior
Both lines you typed in are valid. But they do different thinks. 🙂
Case a) If you like to work with the Display DataStore of the Navigator you have to use you're the second line. ==> Call Navigator.Display.CurrDataStore.SetBrowseSettings(
Case b) If you use the "Navigator.Display.CurrDataStore.GetDataStore" you get a copy of the DataStore used by the Display.CurrDataStore to have a DataStore without a user interface. (You will get the same store by using the command navigator.ConnectDataStore()with the same open parameter.) To set the BrowseSettings for a DataStore without a user interface you will define the direction way you walking thou your data model in case of using .childern methods of the DataStore objects.
Now to you origin question. You could define the display names in the BrowseSettings dialog box. You will find this dialog box in the menu of the Navigator -> Settings -> Current DataProvider -> Brose settings. In the bottom area of this dialog box you could define the display name and by using the ... button you will find all the details.
Best regards
Joerg
12-15-2015 09:48 AM
Hello Joerg: Thank you so much for your reply.
In the Browse settings, I can only seem to set the display name to contain properties from THAT level of the data store. For example, I would like the display name for the aoMeasurment level to display with a property from the aoRun level, but I cannot seem to do that.
The reason for this, is that in our databse, the aoMeasurment level does not have any property explicitly linking it to a given aoRun. So, unfortunately, if you were to load multiple aoMeasurement data sets into Diadem from different aoRun's, there is no reliable way to determine which aoMeasurment belongs to which aoRun.
A workaround to this is to have a custom script load the data, so I can control the properties as I see fit, but this prevents a user from loading the data via the data browser. If I could have the aoMeasurment display name, or even a property of the aoMeasurment, contain a property from the aoRun level, it would solve this.
12-21-2015 07:34 AM
Hi RussellSenior
When I am right I see two or three possibilities to solve your issue.
I hope you are able to solve your issue with one of this possibilities.
Best regards
Joerg
12-21-2015 10:14 AM
Thanks again for the reply. I like number 3, and was reading about the loading event last week. I think this is what I will implement.
Thanks again!
12-22-2015 02:01 AM
If you are heading for the load events and using ASAM ODS you might have a look at this scriptcollection attached.
It is just an example to start with. It makes use of DataStore API and Load events to allow an system used interactive and via script.