---
title: "Workday WQL errors: exact messages and fixes — Kiweely"
description: "Workday's exact WQL error text for a bad prompt value, WHERE ON order, unquoted dates, LIKE, SELECT *, wrong aliases and more, each reproduced and fixed."
url: https://kiweely.com/guides/wql-error-messages
---

# Why does my Workday WQL query fail? The exact error messages and how to fix each one

Workday has no WQL message worded ‘instance set invalid for prompt’. A rejected prompt value returns ‘Invalid Parameter Values for parameter’ or ‘does not meet the restrictions defined for this field’. This page quotes each common error as Workday returned it, with the fix.

-   **Checked** against Workday on November 19
-   Applies to **Workday WQL**
-   8 min read
-   Published September 18
-   By Kiweely

Workday’s WQL returns no message worded “instance set invalid for prompt”. When a value you pass to a data source prompt is rejected, the response says “Invalid Parameter Values for parameter” or “The entered information does not meet the restrictions defined for this field”. Both mean the instance exists but is not one that prompt accepts, and the fix is to pass an instance from the set the prompt allows.

**Kiweely Vine** is a desktop AI agent for Workday consultants and developers (Mac and Windows) that does the Workday work in the tenant you connect: it writes WQL queries, runs them in your tenant and corrects them when Workday rejects one. See how it works below.

Every message below was returned by Workday’s WQL REST API for a query run read-only against a Development tenant. Errors come back as HTTP 400 with this shape:

json

```
{"error":"invalid request: WQL error.","errors":[{"error":"<message>","field":"<token>","severity":"Critical","location":"Invalid SELECT clause"}]}
```

The `location` value tells you which clause Workday blames.

## What does “instance set invalid for prompt” mean in WQL?

A prompt is a parameter that a data source or data source filter asks for in the `FROM` clause, written as `FROM dataSourceAlias(promptAlias=value)`. Single-instance and multi-instance prompts take Workday IDs, and each prompt is tied to a set of allowed instances. A supervisory organization prompt accepts supervisory organizations, not workers or companies.

Workday gives three different answers depending on what you passed:

| What you passed | What Workday returned |
| --- | --- |
| Nothing for a required prompt | “Parms are required for the fields or data source in the query. Provide a value for the prompt.” |
| An ID that is a real instance but outside the prompt’s set | “Invalid WQL query: Invalid Parameter Values for parameter: organization” |
| A value that is not an ID at all | “cannot resolve instance abc” |

A secured prompt can reject a valid instance in a third way. Passing a worker ID to the Worker prompt of the `delegationHistory` data source returned “Invalid WQL query: The entered information does not meet the restrictions defined for this field. (Worker for Delegation History Secured)”. The prompt name says “Secured”, so check what the calling user is allowed to see as well as the ID.

### Worked example: a prompt that rejects a worker ID

`positionsByOrganization` has one required prompt, `organization`. This query passes a worker’s Workday ID:

sql

```
SELECT workdayID
FROM positionsByOrganization(organization=<worker Workday ID>)
```

Workday returned HTTP 400 with “Invalid WQL query: Invalid Parameter Values for parameter: organization”. Leaving the prompt out returned “Parms are required for the fields or data source in the query. Provide a value for the prompt.” with the field `organization`.

To fix it, take the Workday ID of a supervisory organization. One way to get it is to select `supervisoryOrganization` from `allWorkers` and read the `id` in the response:

sql

```
SELECT workdayID FROM positionsByOrganization(organization=<supervisory organization Workday ID>) LIMIT 2
```

That returned HTTP 200 and two rows.

### How do I find which instances a prompt accepts?

Call the metadata endpoints before you write the query. `GET /dataSources/{ID}` lists `requiredParameters` and `optionalParameters` with each prompt’s alias and type. `GET /dataSources/{ID}/dataSourceFilters` does the same for each data source filter. The type tells you whether the prompt takes one value or several. The label usually names the business object the instance must come from.

## Why does WQL say “Parms are required for the fields or data source in the query”?

The data source has a required prompt and the query did not supply it. The `field` in the error names the prompt. Supply it in the `FROM` clause. If the prompt belongs to a calculated field rather than the data source, the separate guide on [the “Parms are required” error](https://kiweely.com/guides/wql-400-parms-are-required-for-fields-or-data-source) covers how to isolate that field.

## Why does WQL say “Invalid WQL syntax” at or near WHERE?

The query has a `WHERE ON` clause after the main `WHERE`. Workday requires every `WHERE ON` clause to come before the main `WHERE`, one `WHERE ON` per related object. Both orders were run:

sql

```
-- Fails
SELECT workdayID, dependents{legalName_LastName}
FROM allWorkers
WHERE fullName startswith 'Lo'
WHERE ON dependents legalName_LastName startswith 'N'
```

Workday returned `"error":"Invalid WQL syntax.","field":"at or near 'WHERE'"`.

sql

```
-- Works
SELECT workdayID, dependents{legalName_LastName}
FROM allWorkers
WHERE ON dependents legalName_LastName startswith 'N'
WHERE fullName startswith 'Lo'
```

The second form returned HTTP 200. Workday’s WHERE and WHERE ON references both state that `WHERE ON` clauses must go before `WHERE`. Inside `WHERE ON`, write the related field without braces.

## Why does WQL say “text or date target values must be in single or double quotes”?

A date or text value in the filter has no quotes. This returned the error:

sql

```
SELECT workdayID, fullName FROM allWorkers WHERE hireDate >= 2026-01-01
```

Quote it:

sql

```
SELECT workdayID FROM allWorkers
WHERE hireDate >= '2026-01-01' AND hireDate < '2027-01-01'
```

Dates use `YYYY-MM-DD`, and datetimes use `YYYY-MM-DD HH:MM:SS` for Pacific time or a trailing `Z` for UTC. Instance values inside `in (...)` take Workday IDs, and a reference ID works with or without quotes.

## Why does WQL fail on LIKE?

WQL has no `LIKE`. Workday returned `"error":"Invalid WQL syntax.","field":"at or near 'LIKE'"` for `WHERE fullName LIKE 'Lo%'`. Use `startswith`, `endswith` or `contains`; the WHERE reference says all three ignore case. `fullName contains 'logan'` matched “Logan McNeil”.

## Why does WQL fail on SELECT \*?

WQL has no wildcard select. Workday returned “Enter a valid report field. This field is invalid: \*.” with location “Invalid SELECT clause”. Name each field, or ask the data source for its field list and choose from it.

## Why does WQL say “Enter a valid report field. This field is invalid”?

The alias in the `SELECT` (or `WHERE`) clause is not a field alias on that data source. `SELECT workdayID, fullNameX FROM allWorkers` returned “Enter a valid report field. This field is invalid: fullNameX.” Capitalisation counts: `FullName` returned the same error where `fullName` works.

Check these, in order:

1.  Copy the alias from `GET /dataSources/{ID}/fields`, not from the field’s label on screen. A label such as “Full Name” and its alias are different things.
2.  Calculated fields use a `cf_` alias that is created from the calculated field’s name. Someone can edit it, and a calculated field that exists in another tenant is not in this one.
3.  The calling user needs access to the field’s security domain. Workday’s FROM reference says a query can only reach fields the processing account has permission to access.

## Why does WQL say “DataSource: ... is invalid”?

The alias after `FROM` is wrong. `FROM allWorkersX` returned “DataSource: allWorkersX is invalid” with location “Invalid FROM clause”, and `FROM AllWorkers` returned the same message. Data source aliases are case-sensitive. List them with `GET /dataSources` and copy the `alias`, not the `descriptor`. The WQL aliases reference lists the endpoints for data sources, filters and fields.

## What does “You can’t use aggregation functions when the SELECT clause specifies a Related Business Object (RBO) field” mean?

The query mixes `COUNT()`, `SUM` or `AVG` with a field in braces. This returned the error:

sql

```
SELECT location, COUNT(), worker{fullName} FROM allWorkers GROUP BY location
```

Split it into two queries: one for the numbers, one for the related details. When the aggregate is the question, `SELECT location, COUNT() FROM allWorkers GROUP BY location` is enough.

## What does “To aggregate fields, specify a numeric field type” mean?

`AVG` or `SUM` was applied to a field that is not numeric. `SELECT supervisoryOrganization, AVG(fullName) FROM allWorkers GROUP BY supervisoryOrganization` returned “Invalid WQL query: To aggregate fields, specify a numeric field type. This field isn’t numeric: AVG(fullName).” To count people, use `COUNT()`, which takes no field.

## Can I compare a text field with greater-than in WQL?

The WHERE reference lists `>`, `>=`, `<` and `<=` for Date and Numeric fields only. In our Development tenant the call was accepted on text fields: `WHERE employeeID > '21100'` returned workers 21117 to 21119, and `WHERE fullName > 'M'` returned names that sort after “M”. The comparison was alphabetical, so “100001” sorts before “21008”.

That behaviour is not in Workday’s documentation, so do not build a split of a large extract on it. On an instance field, the same operator failed: `WHERE worker > 'M'` returned “cannot resolve instance M”. Split on a date or number instead.

## Why does my WQL result stop at 500 rows?

That is a warning, not an error, and it comes from the View WQL Query Result report in the tenant, not from WQL. Workday truncates results to 500 rows there when a query has no limit or a limit above 500. The page on [getting more than 500 rows from WQL](https://kiweely.com/guides/wql-more-than-500-rows) shows paging through the REST API with real totals.

## Why do I see “key cannot be null” with WQL?

It did not appear in any call above. The WQL REST API’s own errors have the shape shown at the top of this page, and Workday’s WQL documentation does not list a “key cannot be null” message. If the text reaches you through a connector, ODBC or ADO driver, or an integration tool, the error is raised on the client side. Turn on that tool’s log, copy the WQL it sent, and run it against the `/data` endpoint. Workday’s reply to that query is the one to fix.

## What to check before you change a query

1.  Run `GET /dataSources` and confirm the alias after `FROM`.
2.  Run `GET /dataSources/{ID}` for `requiredParameters`, and supply each in `FROM`.
3.  Run `GET /dataSources/{ID}/fields` and copy each field alias.
4.  Re-run the smallest query that selects one known field, such as `workdayID`, then add fields back.

Kiweely Vine is an AI agent for Workday that can answer Workday questions and, with the user’s consent, read a connected tenant. That includes running a query like those above and reading Workday’s own error back.

## Where Kiweely fits

**Kiweely Vine** is a desktop AI agent for Workday consultants and developers (Mac and Windows) that does the Workday work in the tenant you connect. It builds reports and WQL queries in your tenant from a plain business question and checks the results.

In a recorded run in Kiweely’s own Workday Development tenant (with fictional sample data, not a customer result), Vine built a custom report from a plain business question (who works in a supervisory organization and its teams, with years of service and counts), ran it and checked it: **3 of 3 checks passed**, 38 minutes from the question to the checked report. The first result wrongly included an outside manager; Vine corrected it and reran it for a second organization ([watch the film](https://youtu.be/6CQCmhRAtWI)).

Vine Free is $0 on a personal developer tenant with $5 of Kiweely Credits included, and Vine Personal ($99/month) and Vine Team ($149/seat/month) connect to any Workday tenant ([pricing](https://kiweely.com/pricing)). [Start free](https://kiweely.com/download).

## Frequently asked questions

### What does 'instance set invalid for prompt' mean in a Workday WQL query?

Workday does not return that wording from WQL. The closest messages say 'Invalid Parameter Values for parameter: <name>' or 'The entered information does not meet the restrictions defined for this field'. Both mean the value you passed to a data source prompt is a real instance, but not one that prompt accepts.

### Why does WQL return 'Enter a valid report field'?

The field alias is not one Workday exposes on that data source for the calling user. Aliases are case-sensitive, so FullName fails where fullName works. Fetch the data source's field list and copy the alias from it.

### Can I use greater-than on a text field in WQL?

Workday's WHERE reference lists greater-than for Date and Numeric fields only. In our Development tenant a text field (employee ID, full name) accepted it and compared alphabetically. Treat that as undocumented and avoid depending on it.

### What does 'key cannot be null' mean for a Workday WQL query?

It is not a response any direct WQL call returned in our tests, and Workday's documentation does not list it. If you see it from a connector or driver, turn on the driver's log, copy the WQL it actually sent, and run that query directly to see Workday's own error.

### Does Workday return HTTP 400 for every WQL error?

Query errors come back as HTTP 400 with an errors list. Paging errors, such as an offset past the end or a limit above 10,000, come back as HTTP 500 with a plain error message.

## Sources checked

-   [Workday Query Language](https://doc.workday.com/admin-guide/en-us/reporting-and-analytics/custom-reports-and-analytics/workday-query-language-wql-/aht1611188422513.html)
-   [WQL FROM clause and data source prompts](https://doc.workday.com/admin-guide/en-us/reporting-and-analytics/custom-reports-and-analytics/workday-query-language-wql-/wql-reference/kba1611189724822.html)
-   [WQL WHERE clause](https://doc.workday.com/admin-guide/en-us/reporting-and-analytics/custom-reports-and-analytics/workday-query-language-wql-/wql-reference/fsf1611267464081.html)
-   [WQL WHERE ON clause](https://doc.workday.com/admin-guide/en-us/reporting-and-analytics/custom-reports-and-analytics/workday-query-language-wql-/wql-reference/czb1657128437777.html)
-   [WQL aliases](https://doc.workday.com/admin-guide/en-us/reporting-and-analytics/custom-reports-and-analytics/workday-query-language-wql-/ktw1644956621314.html)
-   [WQL REST API](https://doc.workday.com/admin-guide/en-us/reporting-and-analytics/custom-reports-and-analytics/workday-query-language-wql-/srr1614364076622.html)
-   [View WQL Query Results](https://doc.workday.com/admin-guide/en-us/reporting-and-analytics/custom-reports-and-analytics/workday-query-language-wql-/dsv1647475571660.html)

## Related guides

[All guides](https://kiweely.com/guides)

-   [### Fixing WQL HTTP 400 “Parms are required for the fields or data source in the query” A WQL query returns HTTP 400 “Parms are required for the fields or data source in the query. Provide a value for the prompt” when a data source filter or calculated field requires a runtime prompt parameter. Learn how to isolate prompted cf\_ fields and pass values via PARAMETERS or FROM.](https://kiweely.com/guides/wql-400-parms-are-required-for-fields-or-data-source)
-   [### WQL Cheat Sheet: Workday Query Language Syntax, Data Sources and Working Examples Workday Query Language reads Workday data sources with SQL-like clauses: PARAMETERS, SELECT, FROM, WHERE ON, WHERE, GROUP BY, HAVING, ORDER BY and LIMIT. Syntax, operators and examples to copy.](https://kiweely.com/guides/workday-wql-cheat-sheet)
-   [### What is Workday Query Language (WQL), and how do you write and run a query? Workday Query Language (WQL) is Workday’s SQL-like language for reading data from data sources and fields instead of reports. You need the Workday Query Language domain in the System functional area; an external caller also needs an API client with System scope.](https://kiweely.com/guides/workday-wql)
-   [### How do I get more than 500 rows from a Workday WQL query? The 500-row stop belongs to the View WQL Query Result report. The WQL REST API returns up to 10,000 rows per page: pass limit (0 to 10,000) and offset. A worked run pages 48,491 rows in five calls, with Workday’s exact errors for a limit above 10,000 and an offset past the end.](https://kiweely.com/guides/wql-more-than-500-rows)

### More guides on WQL

[All 31 guides](https://kiweely.com/guides#wql)

-   [Why does WQL return 403 permission denied S22 for an ISU?](https://kiweely.com/guides/workday-wql-403-s22-as-isu)
-   [Why does Convert Report to WQL break after a field rename?](https://kiweely.com/guides/workday-convert-report-to-wql-after-field-rename)
-   [Why does Convert Report to WQL say this field is missing an adhoc alias?](https://kiweely.com/guides/convert-report-to-wql-adhoc-alias)
-   [How do I build a Workday integration inventory report with every integration system, its template, schedule, last run and owner?](https://kiweely.com/guides/workday-integration-inventory-report-wql)
-   [Retrieving Eligible Absence Plans and Live Balances for a Worker via Workday APIs](https://kiweely.com/guides/workday-absence-balances-api-eligible-plans-for-worker)
-   [Querying the Workday Worker Directory, Supervisory Hierarchy, and Cost Centers with WQL](https://kiweely.com/guides/workday-worker-directory-org-chart-search-fields-wql)
-   [Querying Open Job Requisitions and Supervisory Org Headcount via Workday Staffing APIs](https://kiweely.com/guides/workday-staffing-api-job-requisitions-open-positions-managers)
-   [Finding Unsubmitted Workday Time Blocks and Project Hours with WQL](https://kiweely.com/guides/workday-project-time-tracking-unsubmitted-hours-wql)

### From the blog on WQL

[All posts](https://kiweely.com/blog)

-   [Build vs. Buy a Workday MCP Server: OAuth 2.1, SOAP, WQL, and Twice-Yearly Releases](https://kiweely.com/blog/build-vs-buy-workday-mcp-server-engineering-cost)
-   [What happens after ChatGPT writes your WQL query](https://kiweely.com/blog/after-chatgpt-writes-your-wql)
-   [Answering Executive Span-of-Control and Headcount Questions Live from Workday](https://kiweely.com/blog/executive-org-span-of-control-attrition-questions-live-workday)

## Let Workday check the work.

Kiweely writes WQL and builds orchestrations in your own tenant, and Workday, not Kiweely, says whether they passed.

[Start for free](https://kiweely.com/download) [See how it works](https://kiweely.com/vine/how-it-works)

## Get the next guide in your inbox.

One email a month with new guides and one Extend tip. Nothing else.
