The action is to update a Project. We want the user to be able to pass in the project id or the project name, since in our case project names are unique.
Currently, we have two fields, one for the id and the other for the name. We have help text that says “Use this field only if the name field is empty” and a similar message on the other field.
I think I have seen another zap integration that let the user switch between the two options in a single field but I am not seeing how to do that.
Ideally we have the user choose which of the options they like in one field, instead of two. I know I could just use one field for both and do the check on the backend, but that would require doing the search for id and then searching for the name if id doesn’t turn up anything, but it would be nice to have a field that I could use that didn’t need that.
Input field for getting an object by id or name
Hey
Great question!
From your description, this might be a good fit for the platform’s dynamic field functionality:
For example, you could have one field that asks the user what they want to pass, a name or id. That could be a static dropdown, like below, and importantly, you’d want to make sure that the “Alters Dynamic Fields” box is checked:
![](https://uploads-us-west-2.insided.com/zapier-ca/attachment/6708b016-3c88-4c6f-bfb8-031394176fb3.png)
Then, in the dynamic field, we can check the value of the of first field, referencing it by its key, and conditionally render the corresponding field:
![](https://uploads-us-west-2.insided.com/zapier-ca/attachment/fe3cafcf-b7a1-4037-a46c-1a43b5b60738.png)
![](https://uploads-us-west-2.insided.com/zapier-ca/attachment/7dd533c8-1b79-48bf-bee2-7e9c03bea1a3.png)
![](https://uploads-us-west-2.insided.com/zapier-ca/attachment/a6c4baad-d5ad-465d-a6ba-d47fa8c6f1ba.png)
![](https://uploads-us-west-2.insided.com/zapier-ca/attachment/9c462748-aa26-4526-9146-21813259ca28.png)
Of course, your fields might be more or less complex, but does this give you an idea of how you might approach it?
That is great! I have one of my fields, id, a dropdown field with dynamic data. The dynamic data I want to come from my already existing trigger. I can’t quite grasp how to do that.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.