Skip to main content
Administrator Guide
Last Updated: 2025-04-04
Concept: Related Business Objects in WQL

Concept: Related Business Objects in WQL

You can access fields from a related business object (RBO) in the
SELECT
clause using curly bracket
{}
notation.
You can also filter query results by RBO fields using the
WHERE ON
clause. In
WHERE ON
clauses, omit the curly bracket
{}
notation for the RBO fields.
The responses from these endpoints now return the related business object for each field:
  • GET /dataSources/{ID}/fields
  • GET /dataSources/{ID}/dataSourceFilters/{subresourceID}

Syntax

SELECT
field1
{
relatedBusinessObjectField1, relatedBusinessObjectField2
} FROM
dataSource
Example:
SELECT dependents{age} FROM allWorkers
You can reference a single field or multiple, comma-separated fields from an RBO field.
You can also assign a custom alias to an RBO field. Example:
dependents{age} as DependentsAge

Examples

Return the worker and multiple fields from the
Dependents
RBO in 1 group:
SELECT worker, dependents{legalName_FirstName, legalName_LastName, age} FROM allWorkers
Return the worker and multiple fields from the
Dependents
RBO as separate groups:
SELECT worker, dependents{legalName_FirstName} as FirstName, dependents{legalName_LastName} as LastName, dependents{age} as Age FROM allWorkers
When you call multiple fields separately from the same lookup field, use a unique field alias.

Limitations

When the lookup field for the RBO is multi-instance, Workday only supports up to 500 values for the RBO field. Example: You specify a worker as a primary business object and worker dependents as the RBO. When the query returns more than 500 dependents for a worker, WQL displays an error. Consider using a data source that is based on a Dependents data source instead.
You can’t access fields from RBOs:
  • In queries that use a
    GROUP BY
    clause.
  • Outside of the
    SELECT
    and
    WHERE ON
    clauses.
When you use a third-party API client, you might need to encode the query first. Some third-party clients don't process curly bracket
{}
notation.
Example query before encoding:
SELECT worker, dependents{legalName_FirstName} as FirstName FROM allWorkers
Example query after encoding:
SELECT%20worker%2C%20dependents%7BlegalName_FirstName%7D%20as%20FirstName%20FROM%20allWorkers