We got a few questions about how you can dynamically modify a custom field in ClickUp which uses a more complex mapping (UUID). With the Dropdown and Label field in clickup you can not fill in the value itself, but you have to use the UUID of the option.
Explanation
Below we have the output of the ClickUp module “List All Accessible Custom Fields” which shows you a Dropdown field with each possible option to select out of. As you can see, there is an orderindex and an id for each option. The id of the option has to be used when you want to modify or create a task in clickup with this custom field.
For example, updating a task with this custom field would look like:
This would then result in the dropdown menu to change:
Workflow to dynamically modify field
There are 2 ways you can modify this custom field:
- You find the value of each option and statically map this in a switch() function for example
- You dynamically try to find the correct option and map this
I prefer option 2. which allows a more dynamic system. The workflow would look like this:
- Use the clickup API to list all custom fields
- Use some functions to find the correct option you are looking for
- Add the ID of the custom field option inside of your clickup task
The most important part of this is within the “Set multiple variables”. Basically we have a mapping function in here which;
- Searches for the dropdown field we want
- Finds all options the dropdown menu has
- Then correctly searches for the option we need, and outputs the ID
The first variable is not really used, but just to show you the output of all the options this dropdown field has. The second variable selectOption is the one you would use to dynamically map the option you are looking for:
{{get(map(get(map(4.array; "type_config.options"; "id"; "a51ca7a9-98f2-431e-9c38-05502c06b385"); 1); "id"; "name"; "Testing"); 1)}}
In here there are 2 important parts; the ID of the dropdown menu you want to use “a51ca7a9-98f2-431e-9c38-05502c06b385” and the option you are looking for “Testing”.
Now the last step is to use this output variable in an Edit task for example and voila, you are now dynamically searching for the ID of an option.
Hope this helps you getting started!
Feel free to message us if you have any questions or issues.
Drivn Agency