SplitSingleValuePrompts Parameter (Connect-Workday Cmdlet)
Whether the provider should split lists of prompt values when Workday only allows one.
Syntax
Connect-Workday -SplitSingleValuePrompts SwitchParameter
Data Type
bool
Default Value
false
Remarks
When a table or view has a prompt, the cmdlet normally requires that the query value be compatible with the prompt type.
Prompts that support multiple values can be set using either equals or IN:
SELECT * FROM workersByOrganization WHERE organizationsForWorker_Prompt = '...'; SELECT * FROM workersByOrganization WHERE organizationsForWorker_Prompt IN ('...', '...', '...');
While prompts that support only one value must be set using equals.
The cmdlet reports an error if more than one value is given using IN:
-- OK SELECT * FROM workersByOrganization WHERE includeManagers_Prompt = TRUE; -- Fails SELECT * FROM workersByOrganization WHERE includeManagers_Prompt IN (TRUE, FALSE);
When this option is enabled, the cmdlet does not report errors when multiple values are given to single value prompts. Instead the cmdlet splits the query into individual pieces that Workday can execute, and combines the results client-side. This may lead to duplicate results if the same row appears in two or more of the split queries. To avoid this, make sure to include all of the table's primary key columns in the SELECT clause.
Note that this is noticeably slower than the multi-value prompts that are natively supported by Workday.
Each additional prompt that the cmdlet expands requires exponentially more queries to cover all combinations of values:
-- When this is sent to the cmdlet SELECT * FROM workersByOrganization WHERE includeManagers_Prompt IN (TRUE, FALSE) AND includeSubordinateOrganizations_Prompt IN (TRUE, FALSE) -- These four queries are executed SELECT * FROM workersByOrganization WHERE includeManagers_Prompt = TRUE AND includeSubordinateOrganizations_Prompt = TRUE; SELECT * FROM workersByOrganization WHERE includeManagers_Prompt = TRUE AND includeSubordinateOrganizations_Prompt = FALSE; SELECT * FROM workersByOrganization WHERE includeManagers_Prompt = FALSE AND includeSubordinateOrganizations_Prompt = TRUE; SELECT * FROM workersByOrganization WHERE includeManagers_Prompt = FALSE AND includeSubordinateOrganizations_Prompt = FALSE;