zapier-platform icon indicating copy to clipboard operation
zapier-platform copied to clipboard

Add field key to trigger params when using dynamic dropdowns.

Open evanjarrett opened this issue 5 years ago • 2 comments

Current Behavior

Currently, triggers on dynamic dropdowns do no know what field called them. So if you have input fields generated dynamically, and you want to have the same trigger be used for all of them, you have no way of knowing what field called what trigger.

for example I have 2 fields on an object called "owner" and "company" the Api call would be the same, but i need to pass in the field that called it. so I can make 2 triggers ownerlist.id.name and companylist.id.name

However, our list of input fields is generated dynamically. Ie, a user may have a custom input field "pets" but we don't have a trigger made for it, because we don't know if it will exist at runtime.

Desired Behavior

I believe this request might be a duplicate of https://github.com/zapier/zapier-platform/issues/22 but I am asking for a slightly different use-case. While custom bundle properties might be the more idea solution, I think simply passing in some argument into the trigger that tells you where it came from (input field key) we could then re-use the same logic for multiple fields without needing to make a trigger for every single one.

if our triggers knew what the field was that called them, we could support tons of additional functionality

const getRelatedData = (z, bundle, fieldKey) => {
}

evanjarrett avatar Dec 02 '19 19:12 evanjarrett