Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Create Query VI

LabVIEW 2013 DataFinder Toolkit Help

Edition Date: June 2013

Part Number: 372745E-01

»View Product Info

Owning Palette: DataFinder Toolkit

Requires: LabVIEW DataFinder Toolkit

Creates a query. You can search for text, paths, numeric values, and time/date values. Use the instance Order by only to sort search results according to a property without searching for this particular property. Use the Merge Queries VI to connect query conditions to each other. Use the Execute Query VI to execute a query that consists of one or more search conditions. To select the polymorphic instance, connect data to the appropriate input or select the instance manually.

A query consists of one or more query conditions. A query condition comprises the file property, the channel group property, or the channel property the DataFinder searches in, and the operator and the value with which the DataFinder compares the property. Before the search starts you can specify whether the DataFinder returns files, channel groups, or channels as the search results. By default the DataFinder connects all query conditions with an AND operator. However, you can use the "Merge Queries" VI to connect multiple query conditions with AND or OR. You use the Get Indexed Properties VI to determine for files, groups, or channels, the list of all the indexed properties in which you can execute a query.

Note   The DataFinder only can sort according to base properties and optimized custom properties.

Note   The DataFinder only can sort according to properties which can be clearly specified. For example, the DataFinder cannot sort according to channel names in a search for files.

Use the pull-down menu to select an instance of this VI.

Create Query (Numeric)

Create Query (Numeric)

/images/reference/en-XX/help/372745E-01/cu16.gif  order by Specifies whether a condition is used to sort the results ordered and if so, whether in ascending or descending direction. The default value is none. The more conditions that are used with orderby in ascending or descending direction, the slower the query execution becomes.
/images/reference/en-XX/help/372745E-01/cu16.gif object type Enumeration for the object type. {File:0, Channel Group:1, Channel:2}
/images/reference/en-XX/help/372745E-01/cstr.gif property name specifies the property that the DataFinder searches for the specified value.
/images/reference/en-XX/help/372745E-01/cu16.gif comparison operator specifies the operator that the DataFinder searches for. You can use the operators =, <>, <, >=, >, and >= when you search for numeric properties. When you search for text properties, you can use only the operators = and <>. In the search for date/time properties, for example, for the file property Modify date, the DataFinder provides the following operators: =, >=, <=, and #. If you select the # operator, you can use the following operands: Today, Yesterday, LastSevenDays, LastFourteenDays, LastThirtyDays. The DataFinder executes the search in relation to the current date. For example, if you use the operator # to search for the creation date Today, and you save the search, the search uses the current date if you execute the search again at a later date.
/images/reference/en-XX/help/372745E-01/cdbl.gif value specifies the value of the property to be searched for. To search for date/time properties, you must explicitly select the date/time data type in the VI. Date/time values must be in the range between January 1, 100 and December 31, 9999. You also can execute OR operations on individual texts or numeric values. If you search for the text Or, you must enter /Or as the search text, instead of Or.
/images/reference/en-XX/help/372745E-01/ccclst.gif error in (no error) describes error conditions that occur before this node runs. This input provides standard error in functionality.
/images/reference/en-XX/help/372745E-01/irn.gif query reference out is the reference to the new query condition.
/images/reference/en-XX/help/372745E-01/icclst.gif error out contains error information. This output provides standard error out functionality.

Create Query (Date)

Create Query (Date)

/images/reference/en-XX/help/372745E-01/cu16.gif  order by Specifies whether a condition is ordered and if so, whether in ascending or descending direction. The default value is none. The more conditions that are used with orderby in ascending or descending direction, the slower the query execution becomes.
/images/reference/en-XX/help/372745E-01/cu16.gif object type Enumeration for the object type. {File:0, Channel Group:1, Channel:2}
/images/reference/en-XX/help/372745E-01/cstr.gif property name specifies the property that the DataFinder searches for the specified value.
/images/reference/en-XX/help/372745E-01/cu16.gif comparison operator specifies the operator that the DataFinder searches for. You can use the operators =, <>, <, >=, >, and >= when you search for numeric properties. When you search for text properties, you can use only the operators = and <>. In the search for date/time properties, for example, for the file property Modify date, the DataFinder provides the following operators: =, >=, <=, and #. If you select the # operator, you can use the following operands: Today, Yesterday, LastSevenDays, LastFourteenDays, LastThirtyDays. The DataFinder executes the search in relation to the current date. For example, if you use the operator # to search for the creation date Today, and you save the search, the search uses the current date if you execute the search again at a later date.
/images/reference/en-XX/help/372745E-01/ctimestamp.gif value specifies the value of the property to be searched for. To search for date/time properties, you must explicitly select the date/time data type in the VI. Date/time values must be in the range between January 1, 100 and December 31, 9999. You also can execute OR operations on individual texts or numeric values. If you search for the text Or, you must enter /Or as the search text, instead of Or.
/images/reference/en-XX/help/372745E-01/ccclst.gif error in (no error) describes error conditions that occur before this node runs. This input provides standard error in functionality.
/images/reference/en-XX/help/372745E-01/irn.gif query reference out is the reference to the new query condition.
/images/reference/en-XX/help/372745E-01/icclst.gif error out contains error information. This output provides standard error out functionality.

Create Query (Path)

Create Query (Path)

/images/reference/en-XX/help/372745E-01/cu16.gif  order by Specifies whether a condition is ordered and if so, whether in ascending or descending direction. The default value is none. The more conditions that are used with orderby in ascending or descending direction, the slower the query execution becomes.
/images/reference/en-XX/help/372745E-01/cu16.gif object type Enumeration for the object type. {File:0, Channel Group:1, Channel:2}
/images/reference/en-XX/help/372745E-01/cstr.gif property name specifies the property that the DataFinder searches for the specified value.
/images/reference/en-XX/help/372745E-01/cu16.gif comparison operator specifies the operator that the DataFinder searches for. You can use the operators =, <>, <, >=, >, and >= when you search for numeric properties. When you search for text properties, you can use only the operators = and <>. In the search for date/time properties, for example, for the file property Modify date, the DataFinder provides the following operators: =, >=, <=, and #. If you select the # operator, you can use the following operands: Today, Yesterday, LastSevenDays, LastFourteenDays, LastThirtyDays. The DataFinder executes the search in relation to the current date. For example, if you use the operator # to search for the creation date Today, and you save the search, the search uses the current date if you execute the search again at a later date.
/images/reference/en-XX/help/372745E-01/cpath.gif value specifies the value of the property to be searched for. To search for date/time properties, you must explicitly select the date/time data type in the VI. Date/time values must be in the range between January 1, 100 and December 31, 9999. You also can execute OR operations on individual texts or numeric values. If you search for the text Or, you must enter /Or as the search text, instead of Or.
/images/reference/en-XX/help/372745E-01/ccclst.gif error in (no error) describes error conditions that occur before this node runs. This input provides standard error in functionality.
/images/reference/en-XX/help/372745E-01/irn.gif query reference out is the reference to the new query condition.
/images/reference/en-XX/help/372745E-01/icclst.gif error out contains error information. This output provides standard error out functionality.

Create Query (String)

Create Query (String)

/images/reference/en-XX/help/372745E-01/cu16.gif  order by Specifies whether a condition is ordered and if so, whether in ascending or descending direction. The default value is none. The more conditions that are used with orderby in ascending or descending direction, the slower the query execution becomes.
/images/reference/en-XX/help/372745E-01/cu16.gif object type Enumeration for the object type. {File:0, Channel Group:1, Channel:2}
/images/reference/en-XX/help/372745E-01/cstr.gif property name specifies the property that the DataFinder searches for the specified value.
/images/reference/en-XX/help/372745E-01/cu16.gif comparison operator specifies the operator that the DataFinder searches for. You can use the operators =, <>, <, >=, >, and >= when you search for numeric properties. When you search for text properties, you can use only the operators = and <>. In the search for date/time properties, for example, for the file property Modify date, the DataFinder provides the following operators: =, >=, <=, and #. If you select the # operator, you can use the following operands: Today, Yesterday, LastSevenDays, LastFourteenDays, LastThirtyDays. The DataFinder executes the search in relation to the current date. For example, if you use the operator # to search for the creation date Today, and you save the search, the search uses the current date if you execute the search again at a later date.
/images/reference/en-XX/help/372745E-01/cstr.gif value specifies the value of the property to be searched for. To search for date/time properties, you must explicitly select the date/time data type in the VI. Date/time values must be in the range between January 1, 100 and December 31, 9999. You also can execute OR operations on individual texts or numeric values. If you search for the text Or, you must enter /Or as the search text, instead of Or.
/images/reference/en-XX/help/372745E-01/ccclst.gif error in (no error) describes error conditions that occur before this node runs. This input provides standard error in functionality.
/images/reference/en-XX/help/372745E-01/irn.gif query reference out is the reference to the new query condition.
/images/reference/en-XX/help/372745E-01/icclst.gif error out contains error information. This output provides standard error out functionality.

Create Query (Order by only)

Create Query (Order by only)

/images/reference/en-XX/help/372745E-01/cu16.gif  order by Specifies whether the search results are sorted by this property in ascending or descending direction. The more conditions that are ordered in ascending or descending direction, the slower the query execution becomes.
/images/reference/en-XX/help/372745E-01/cu16.gif object type Enumeration for the object type. {File:0, Channel Group:1, Channel:2}
/images/reference/en-XX/help/372745E-01/cstr.gif property name specifies the property that the DataFinder searches for the specified value.
/images/reference/en-XX/help/372745E-01/ccclst.gif error in (no error) describes error conditions that occur before this node runs. This input provides standard error in functionality.
/images/reference/en-XX/help/372745E-01/irn.gif query reference out is the reference to the new query condition.
/images/reference/en-XX/help/372745E-01/icclst.gif error out contains error information. This output provides standard error out functionality.

Examples

Refer to the following VIs for examples of using the Create Query VI:

  • Execute Query VI: labview\examples\DataFinder\DataFinder_Examples.lvproj

  • DataFinder_Pass_Fail_Analysis VI: labview\examples\DataFinder\DataFinder_Examples.lvproj


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit