DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Display a data store property with a property from a parent

Solved!
Go to solution

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. 

0 Kudos
Message 1 of 8
(4,570 Views)

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)

0 Kudos
Message 2 of 8
(4,568 Views)

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. 

 

0 Kudos
Message 3 of 8
(4,559 Views)

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

0 Kudos
Message 4 of 8
(4,519 Views)

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. 

0 Kudos
Message 5 of 8
(4,515 Views)
Solution
Accepted by topic author RussellSenior

Hi RussellSenior

 

When I am right I see two or three possibilities to solve your issue.

 

  1. Make use of the inheritance switch. You will find this switch in the Settings dialog box for the DIAdem Navigator. Here you will find the area of “Loading Behavior”. At this page you will find the switches to control the Property inheritance and in case of ASAM data stores the ability of property naming behavior.
    This switch allows you to copy or move properties form Root- or Group-level to the e.g. channel level. Perhaps this could solve the issue.
  2. Use a defined Loading Parameter Set. You will find the parameter dialog of this feature in the Navigator menu -> Settings ->Current Data Provider -> Loading Configuration.
    Here you specify the properties of an ASAM data store which DIAdem imports into the Data Portal when loading bulk data. Please find more detailed information by using the Help function.
  3. All of the loading commends do have the ability to work with additional event functions. There are two definitions of event functions. These functions are called when defined.
    In front of the loading command the OnFileLoading() / OnStoreLoading() event will be called and at the end of the loading process the event OnLoaded() will be called. The code of these event functions could do the job of additional loading the properties to the loading data.

I hope you are able to solve your issue with one of this possibilities.

 

Best regards

Joerg

Message 6 of 8
(4,429 Views)

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!  

0 Kudos
Message 7 of 8
(4,416 Views)

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.

 

0 Kudos
Message 8 of 8
(4,376 Views)