DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Search Data store for text value

Solved!
Go to solution

Hello, I have an AOP data store, and I would like to search for a text value in a measurement quantity.  In each of my test series, there is a measurement quantity with the name TCNAME ans stores the test cell name in string format.  I would like to search for all TCNAMEs that contain "TC4"  for example.  Currently, I have to load TCNAME into the portal and view it in a channel table. 

 

Any ideas how I can do this? 

0 Kudos
Message 1 of 4
(4,733 Views)

Hi RSenior,

 

What version of DIAdem do you have? Do you have access to DIAdem scripting? Is your TCNAME quantity stored as a property of a channel?

0 Kudos
Message 2 of 4
(4,721 Views)

2011

 

 

Unfortunatley, it's not a property of the channel, but the actual value of the channel.

 

 

I can script it, but I assumed that Diadem search can do it a lot faster than any VB script I can make.  I know with the data finder, I can search based on channel values.  So I can say I want all data files with channel "Temperature" that have values >60.  It's not obvious that that functionality is available with the data store search.  Maybe it isn't there, but I thought I would ask. 

0 Kudos
Message 3 of 4
(4,711 Views)
Solution
Accepted by topic author RSenior

I assume you are using a PUMA Testbed that stores those kind of properties to a single value string channels.

There is no direct search method so I assume a script is the only solution that we can offer.

 

In datafinder you can search for minimum and maximum of a channel. That would work in ASAM store too.

 

' AOP / rpc
dim tcnameMQs : set tcnameMQs = store.GetElementList("MeasurementQuantity", "name=TCNAME", true)
dim tcnameMQ : for each tcnameMQ in tcnameMQs
  MsgBox tcnameMq.References("local_columns").Elements(1).Properties("values").Value
Next

' AOP5 / Corba
dim tcnameLCs : set tcnameLCs = store.GetElementList("LocalColumn", "measurement_quantity.name=TCNAME", true)
dim tcnameLC : for each tcnameLC in tcnameLCs
  MsgBox tcnameLC.Properties("values").Value
Next

 I add the example that should be shortest way from my perspective. In AOP5 you can search for LocalColumn and skip the MQs which is less overhead.

 

Maybe its a good Idea to postprocess the database and overwrite the decription "Name of test cell" by 

"Name of test cell==NAME". You can search for non postprocessed by searchin for.

 

dim tcnameMQs : set tcnameMQs = store.GetElementList("MeasurementQuantity", "description=Name of test cell", true)
dim tcnameMQ : for each tcnameMQ in tcnameMQs
  tcnameMQ.Properties("description").Value = "Name of test cell==" & tcnameMq.References("local_columns").Elements(1).Properties("values").Value
Next
store.save

Afterwards you would be able to search for it.

 

Greetings

Andreas

 

Message 4 of 4
(4,706 Views)