Dynamic dropdown options

The example rule code below loads a dropdown field's options by calling a REST web service on the load of a step. The returned data is used to load the options.

const response = await fetch('https://dog.ceo/api/breeds/list/all');
const dogs = await response.json();
// set the options to the keys of the returned object
DropdownDogs.options = Object.keys(dogs.message);

Last updated