Home > Forum > Tips&Tricks > Get all ChoiceList values using API

Get all ChoiceList values using API
1

Hi Arek,

do you want all entries of a data source that could be selected in a choice picker field or do you want the selected values in a choice picker field of a workflow instance?

To read the selected values of a choice picker field of a workflow instance you can use this elements endpoint:
https://developer.webcon.com/docs/basic-operations
https://developer.webcon.com/docs/workflow-instances
https://developer.webcon.com/docs/2020.1/form-fields-and-item-lists/

If you want to get all values of a data source I don‘t know an endpoint for it.
A workaround could be to do a simple process wrapper with an item list and the needed columns that gets initialized with a data source. A path out- and incoming to the Start step could reinitialize the item list.
Once you‘ve an instance and after going the reinitialization path you can read it out as above.
You could also create a JSON output and an own user api endpoint.

Maybe there are some better ways? But I hope to give you a possible solution.

Kind regards
Sébastien

WEBCON

Hi,

# Public API

Please take a look at these endpoints in Public API:
- /elements/resolveFieldValue/{idguid}
- /elements/{id}/resolveColumnValue/{idguid}

Both return a list of possible values for a given picker form field {idguid}.
The second does it in the context of a given element {id} - returns what is possible to select in a given field on a specific element.
There is also a variant for doing that on item lists columns - resolveColumnValue

# API Definition

The other option is to use API Definitions. You can create one, that returns data from a given data source.
This way you can add multiple input parameters used for filtering the data source.

# Links
- https://developer.webcon.com/2026/resources/rest_api7.0/index.html#tag/PublicApiElements/paths/~1api~1data~1v7.0~1db~1%7BdbId%7D~1elements~1%7Bid%7D~1resolveFieldValue~1%7Bidguid%7D/post
- https://developer.webcon.com/2026/resources/rest_api7.0/index.html#tag/PublicApiElements/paths/~1api~1data~1v7.0~1db~1%7BdbId%7D~1elements~1resolveFieldValue~1%7Bidguid%7D/post
- https://docs.webcon.com/docs/2026R1/Studio/Process/APIDefinition/#2-running-mode