DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I combine search criteria with OR operator?

In the NAVIGATOR, is there a way to combine search criteria with an "OR" operator in the advanced search?  For example, search for channel names that equal channel 1 OR channel 2.
0 Kudos
Message 1 of 8
(4,621 Views)
Hello!
 
As far as I know is there no way to OR criteria. It's by design!
 
Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 2 of 8
(4,611 Views)

Hi mrclary,

No, the DataFinder does not currently support logical OR'd conditions.  The best workaround I can suggest is to programmatically run the query twice, once with value A, once with value B (where A and B are the two or more OR values in the condition).  You can programmatically load the search results from each query into the Data Portal and merge them there.  This is not pretty, but it will work if you absolutely have to have ORs.

Let me know if you want more info on this,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 3 of 8
(4,603 Views)
Thanks Brad, I would like more info. Perhaps this could be recommended as a feature in a new release of DIAdem? I would also like to see multiple search result tabs.
0 Kudos
Message 4 of 8
(4,599 Views)

Hi mrclary,

Rest assured that OR operators in the NAVIGATOR and for the DataFinder have been frequently requested as a new DIAdem feature.  This is not coming in the DIAdem 10.2 release this Spring, by I am hopeful for the future-- R&D knows that this is important for our users.

For your query merging, let me ask you if you are wanting to load rows (if so Files, Groups, or Channels), or if you are wanting to load property columns.  In the former case I would guess that each row would be loaded into one or more new channels with no channel appending necessary.  In the latter case I would guess that you would want each separate set of query results merged into the same set of data channels using channel appending.

Let me know your particular merge situation,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 5 of 8
(4,572 Views)
I am not sure that I understand what you mean by "load property columns"; nevertheless, I would simply load each row of a search result into its own channel, i.e if there are 10 channels returned by the search, I would load 10 new channels. If the search result returned 10 channel groups, I would load each channel group into a new channel group.
0 Kudos
Message 6 of 8
(4,568 Views)

Hi mrclary,

OK, for row loading here is an example you ought to be able to use without needing to edit it.  You can call your own custom script after the queries are automated and merged in case you want to perform actions afterwards, and you can programmatically create the Parameter Query files prior to calling the "Merge Queries.VBS" script with ScriptStart() if you want to run stuff beforehand.

Notice that all the various OR values for each property are in a single "Param # Description.TDQ" file, so that you can easily create these interactively or programmatically.  You can have up to 20 separate OR parameters, plus as many extra AND conditions as you want (in the "Main Query.TDQ" file.

Ask if you have questions,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 7 of 8
(4,563 Views)
Hello,
 
In the attached VI I expected the result of the or-operation to be {A, B} but it gives {A, A}. Do I misunderstand the Merge Queries VI?
 
Thanks in advance,
 
Bart.
0 Kudos
Message 8 of 8
(4,435 Views)