I have a client_ids trigger returning the following to populate the dropdown:
[
{id: 1, name: ‘one},
{id: 2, name: ‘two},
]
In merchant_ids trigger I want to get the name of the field selected from the client_id dropdown."
When I do bundle.inputData.client_id I get the id.
Is there a way to get the name ?
Best answer by OsasBest answer by Osas
Hi @hectorconceicao,
You have 2 options here depending on what you want to achieve.
If you want the name to be sent on the trigger’s API request instead of the ID, then the `dynamic` value in the input fields should be 'merchant_ids.name.name' and 'client_ids.name.name' respectively.
If the ID should be sent in the trigger’s API request but you need the names as well to be used in the trigger’s code, then you would have to send API requests to fetch the client and merchant names using the provided IDs (this depends on if your API can return a client or merchant based on the provided ID). Note that every trigger code and API requests need to be resolved within 30 seconds as seen here: https://platform.zapier.com/build/operating-constraints
You have 2 options here depending on what you want to achieve.
If you want the name to be sent on the trigger’s API request instead of the ID, then the `dynamic` value in the input fields should be 'merchant_ids.name.name' and 'client_ids.name.name' respectively.
If the ID should be sent in the trigger’s API request but you need the names as well to be used in the trigger’s code, then you would have to send API requests to fetch the client and merchant names using the provided IDs (this depends on if your API can return a client or merchant based on the provided ID). Note that every trigger code and API requests need to be resolved within 30 seconds as seen here: https://platform.zapier.com/build/operating-constraints
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
More about cookies
Customize which cookies to allow
Marketing cookies
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.
Social media cookies
label
These cookies are set by a range of social media services that we have added to the site to enable you to share our content with your friends and networks. They are capable of tracking your browser across other sites and building up a profile of your interests. This may impact the content and messages you see on other websites you visit. If you do not allow these cookies you may not be able to use or see these sharing tools.
Analytics/performance cookies
These cookies enable the website to provide enhanced functionality and personalization, and allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. These cookies may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly and we will not know how you are using our site.
Functional cookies
label
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
Essential cookies
Always active
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.