# Workday – must include inputs (“prompts”) to query certain tables

**URL:** <https://community.cdata.com/t/workday-must-include-inputs-prompts-to-query-certain-tables/351>\
**Category:** Data Sources\
**Tags:** article, workday\
**Created:** [August 22, 2023, 7:40pm UTC](https://community.cdata.com/t/workday-must-include-inputs-prompts-to-query-certain-tables/351 "2023-08-22T19:40:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naomi\_Y](https://avatars.discourse-cdn.com/v4/letter/n/ea666f/32.png) [@Naomi\_Y](https://community.cdata.com/u/Naomi_Y)\
**Post date:** [August 22, 2023, 7:40pm UTC](https://community.cdata.com/t/workday-must-include-inputs-prompts-to-query-certain-tables/351/1 "2023-08-22T19:40:47Z")

</div>

Workday requires inputs, which they call “prompts”, to successfully execute queries. The inputs are rarely intuitive values.

For example, to query journalLines, you need to use the following query:

SELECT \*

FROM journalLines

WHERE company\_Prompt = ‘cb550da820584750aae8f807882fa79a’

AND year\_Prompt = ‘2f54eb1728bf102c30f35c40194d0344’

AND journalEntryStatus\_Prompt = ‘6f8e52d2376e4c899463020db034c87c’

AND entryMomentFrom\_Prompt = ‘1/1/2017’

AND entryMomentTo\_Prompt = ‘6/1/2017’

limit 10;

For company\_Prompt, year\_Prompt, and journalEntryStatus\_Prompt, you must provide GUIDs.

This is different from the Workday UI, where it gives you a dropdown of friendly names to choose from as inputs. The Workday UI also does not seem to show the same prompts as are needed for the API.

Furthermore, the Workday UI does not give you the GUIDs of those values, so your only option is to query them from other tables via the driver. Unfortunately, sometimes those tables require prompts themselves.

To query journalLines, you must run two prerequisite queries first.

-- Query #1

SELECT [workdayId], [company.descriptor]

FROM companies

WHERE [company.descriptor] = ‘Foobar Industries’;

Use the returned workdayId from Query #1 as company\_Prompt in Query #2, then:

-- Query #2

SELECT [company.descriptor], [company.id], [journalStatus.id], [journalStatus.descriptor], [fiscalYear.id],[fiscalYearNumber]

FROM journals

WHERE company\_Prompt = ‘cb550da820584750aae8f807882fa79a’

AND accountingDateOnOrAfter\_Prompt = ‘1/1/2017’

AND accountingDateOnOrBefore\_Prompt = ‘3/1/2017’

limit 10;

Use the returned journalStatus.id as the journalEntryStatus\_Prompt and the fiscalYear.id as the&nbsp; year\_Prompt, as shown in the query at the beginning of this article.

Please reach out to [support@cdata.com](mailto:support@cdata.com) if this does not resolve the problem for you.
