Common problems with OI OData datasets, and how to solve them.
First step for any error: run the query in a browser. Sign in to Explorer, then open https://<your-oi-server>/<service-root>/odata/<your query>, with any parameters replaced by real values. The browser shows the full error message from the OData service, which is usually more detailed than the message the dataset shows.
The dataset fails with "Not Found: '…' is not an object of this service"
The query starts with a name the service doesn't have, such as EntryClassificationSchemas. The message names it and, where it can, says what you probably meant: Did you mean 'EntryForms'?. Check the name against the Object Reference. A query the service refuses like this only fails that dataset. Other datasets on the same datasource keep working.
The dataset fails with "Bad Request"
The OData service didn't understand the query. The message says what it didn't understand. For a name it doesn't know, it says what you probably meant, such as Did you mean 'FormSchema'? or Write it as 'OI.monthsago'. Common causes:
- The object or field name is misspelled. Check $metadata or the Object Reference. Capitals don't matter: tags works the same as Tags.
- An OI query function is missing its OI. prefix. Write OI.monthsago(3), not monthsago(3). See OI query functions.
- Text isn't quoted, or a date is quoted. Text needs single quotes: Name eq 'WELL-A12'. Dates don't: StartTime ge 2026-09-01T00:00:00Z.
- $orderby uses a column that isn't in a grouped result. After groupby, you can only sort on group keys and aggregate aliases.
- A function isn't available on this object. The OI query functions only work on database-backed objects.
- $top is over 1,000.
- A count or aggregation on a live object with more than 5,000 rows. $count=true and apply can only see the first 5,000 rows of a live object, so they're refused. Use the database-backed object instead (see Limits and Performance).
The dataset fails with "Not Acceptable"
The service writes JSON only. The request asked for another format, such as Accept: application/xml or $format=xml. Ask for application/json, or leave the format out.
The dataset fails with "The following OData data type is not supported"
The result contains a nested object or a list, which a dataset can't hold. This happens with:
- $expand
- groupby on a related field, such as groupby((Workspace/Name))
- $select of a navigation or collection field, such as Templates or Attributes
Compute related values into their own columns instead. See Getting related values into a dataset.
The dataset fails with "This operation is not supported by OData adaptors"
The query uses a SQL keyword such as PARAM, PARAMS, SORTBY, FIRSTROW or LASTROW. Use ODataParam and ODataSortBy instead, and ODataSkip() and ODataTop() in place of FIRSTROW and LASTROW. See Parameters.
Keywords are recognised anywhere in the query text, even inside a quoted value. Avoid text such as Param( or SortBy( in values.
The dataset fails with "No calling user" or "refusing to query without a security context"
OI OData datasets always run as a signed-in user. This error means the dataset was requested by a process with no user, such as a background or system task. Use OI OData datasets on pages that users view.
The dataset shows fewer rows than expected
- The dataset limit is 1,000 rows. Only the first page of results is read. Filter, aggregate, or use $top with $orderby. See The 1,000-row dataset limit.
- The 5,000-row fetch cap applied. On live objects, filters run over the first 5,000 source rows only. Use the database-backed equivalent. See The 5,000-row fetch cap.
- Security is filtering rows. The dataset runs as the person viewing the page. Check that the user can see the assets, workspaces or entries in Explorer.
- Another user's private workspace. Related values from a workspace you can't see come back null, so a Workspace/Name ne null filter leaves those rows out.
Two users see different results on the same page
This is expected. Each user sees the data their Explorer security allows. See Security.
Numbers sort or compare wrongly
Sentinel Value, attribute values and audit values are stored as text, so '900' gt '1000' is true. On database-backed objects, use OI.tonumber(...). Otherwise, convert the values on the page.
Form fields on SapiCases, SapiIssues, SapiSummaries and SapiTimeWindows keep their type, but a number compared with a quoted value is compared as text. Write DeferredOil gt 900, not DeferredOil gt '900'. A field that holds several values is text.
All Union output columns are text too.
Times are a few hours out
- OI OData returns times in UTC. Check the page and datasource time zone settings.
- Dates are stored, and the rolling-window functions (OI.daysago and others) work, in UTC. Day and month boundaries are UTC midnight, not the site's. See Current time and time zones.
- To group by a site's local hour or day, use OI.attimezone.
A data-entry field shows a different value from the entry in Explorer
OI OData reads data-entry fields live from the historian when the query runs. If historian data was corrected, or the field's source time is "Now", the value differs from the one saved. See Live values for data-entry fields.
The dataset times out
- Filter first, and aggregate on the server.
- Use database-backed objects for searches and counts.
- On entries, select only the live data-entry fields you need, and filter on saved fields.
- If the query is already efficient, raise the datasource's Request Timeout in Core Management. This helps only up to the 30-second database query timeout.
See the Performance checklist.
A query works in the browser but fails as a dataset
- The query contains a line break. Write dataset queries on one line.
- The query starts with /odata/ or https://. Start with the object name.
- The query uses $expand. It works in a browser, but not in a dataset.
- A parameter value was already URL-encoded. ODataParam encodes text values itself, so Oil%20Gas is matched as that literal text. Pass the value as typed. See Parameters.
- The browser uses your security, and the page uses the viewer's. Try the query signed in as the affected user.