Query Element Properties - Automate_Studio_Manager - Automate_Evolve - Latest

Automate Evolve User Guide

Product type
Software
Portfolio
Integrate
Product family
Automate
Product
Automate > Automate Studio Manager
Automate > Automate Evolve
Version
Latest
ft:locale
en-US
Product name
Automate Evolve
ft:title
Automate Evolve User Guide
Copyright
2026
First publish date
2018
ft:lastEdition
2026-10-13
ft:lastPublication
2026-10-13T12:25:18.315000
L1_Product_Gateway
Integrate
L2_Product_Segment
Data Integration
L3_Product_Brand
Precisely Automate
L4_Investment_Segment
SAP Automation
L5_Product_Group
Winshuttle Enterprise
L6_Product_Name
Automate Studio
Automate Studio Manager
Automate Evolve

Use the Query element to query a data source, including sources such as ODBC, OLEDB, or LDAP.

The query can be run when the form is submitted or when a field changes.

Results of the query can be displayed in a repeating element if it contains more than one item.

Tip:
  • Provide the Query with brackets around the connection column name when working with Solution Data Library or Reference Data connection types.

  • The Filter property of Query Control has been disabled for userfromgroup Data Connection.

Back to Form Elements

Related topic: Element Properties

Query Element Properties

Property

Description

Name

A descriptive name for the element.

Data Connection

The name of the data connection. It can be, for example, SQL Server, ODBC, OLEDB, or LDAP.

In case LDAP data connection is used, LDAP settings will be picked from Evolve server.

Query

Query to run on the data source. See help below.

If a query is not provided, all data in the data connection is returned.

Run at

  • Start: Runs the query when the form is started.

  • End: Runs the query when the form is submitted.

  • When field changes: Runs when a form field changes.

  • Invoked by rule: Runs when a rule triggers it, such as when a Button Element Properties is clicked.

Field

Runs the query when the specified field is changed.

Set Fields

Comma-separated list of query return values and fields to set in the form. The format is:

<Form field name>=<Column in Data Connection>,
<Form field name>=<Column in Data Connection>,
…

Append To Repeating Group

Appends results to an existing repeating group.

Ordinal

The order (1, 2, and so on) in which the query should be performed when multiple Query elements are used.

Clear Fields When Empty Return

If the query returns no rows, selecting this option will cause the form fields to be cleared.

This property works with Run At: On Field Change and Invoked by Rule only.

Empty Message

The message to display when the query returns no rows. If this field is left empty, no message is displayed.

This property works with Run At: On Field Change and Invoked by Rule only.

Add and Configure a Query

The following procedure shows you how to add and configure a query.

  1. On the Elements tab, click Advanced Elements.

  2. Click Query.

  3. The Query element is inserted in the upper left corner of the form.

  4. Click the Query button to open its properties in the Properties pane.

  5. Under Data Connection, select the data connection for the query from the dropdown menu. (Note: You can click Add to add a data connection if necessary).

  6. To add a query, under Query paste the query code into the query field.

    Tip:

    If the Query is querying a SharePoint list, you only need the filter= value because a Composer SharePoint data connection already has the SharePoint List name and the SharePoint List fields maintained in its properties.

    Example: SharePointColumn==@[myFieldXPath], which can look like this in a real scenario: Code==@[/my:myFields/my:CurrencyCode]

  7. Sorting: When using query fields in Composer, the query is performed prior to Composer sorting fields. For instance, if your query only pulls back certain currencies, and the data connection is set to sort on Currency Rate, the data set will be sorted by currency rate only for the currencies the query field returns.

  8. Under Run At, select when you want the Query to run:

    • Start: Run when the form is started

    • End: Run when the form is completed

    • When field changes: Run the Query when the field is changed

  9. Below Set Fields, click Choose. Select the field(s) and the corresponding column(s) that will display the data returned by the Query.

  10. Fill out the remaining information if needed. (See the properties table above for a description of each option.)

Configuring the Query element for SharePoint User Profile Services

The SharePoint User Profile Service needs the Login Name of the user before it can return anything. You can use the Current User element to obtain the login name for the currently logged in user and populate a field in your form with the Login Name.

Note: See Microsoft Technet article Default user profile properties table as a reference for when looking up SharePoint User Profile properties. Note that some properties appear to have spaces in them, but this is for display purposes only. The Query control requires the internal name of the property and not the display name to pass the value of the 'User Profile Property' column within the table.

SQL Query Examples

Some examples of Query being used for SQL queries are provided below.

Example 1

select top 1 Profession from [Job Title Taxonomy] where
ProfessionID =
[/my:myFields/my:PO13_Descriptions/my:PO13_Descriptions_Input/my:Search_Term]

This query returns just one row and one field, where a table column equals the value in a form field. Notice the square brackets around the table name (because it has spaces in it) and the full XPath of the form field name with square brackets.

Tip:

top 1 in this example is SQL Server-specific; other databases may use different syntax.

Example 2

select Profession from [Job Title Taxonomy] where
EmployeeName like
'[/my:myFields/my:PO13_Descriptions/my:PO13_Descriptions_Input/my:Search_Term]%'

Single quotes must be used around the XPath because the value returned is a string value with potential spaces. The percentage sign is used as a wildcard after the XPath value to ensure the return of all results starting with the value that comes from EmployeeName.

Tip:

Single quotes are required around string values.

Example 3

select distinct ProfessionID from [Job Title Taxonomy]

This query returns unique values of ProfessionID from the table. The results would then be mapped to a repeating section in a form, which is then used as input for dropdown values. Because this can result in very large tables, using SQL for this type of operation is faster and more efficient.

Example 4

With a Solution Data Library and Reference Data, you have a select and a filter statement as shown in the query below.

Value from Form field:

[VendorName]=[/my:myFields/my:Vendor_Name]

This returns data where vendorname is equal to the value in the form field Vendor_Name.

Direct Value:

[VendorName]='Vendor1'

This returns data where vendorname is equal to Vendor1.

Example 5

Tip:

If the value is numeric, single quotes around string values are not required.

[Country]=='[/my:myFields/my:Country]' AND [Region]=='[/my:myFields/my:Region]'