Last active
September 20, 2019 22:22
-
-
Save mike-solomon/636f270db537567d2b63c82d04224bf7 to your computer and use it in GitHub Desktop.
sampleField
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Trigger / action code here | |
const methodNameToAddFieldBasedOnAbove = async (z, bundle) => { | |
// projectOnEachLine would be whatever the value is for that entry in | |
// the project dropdown | |
if (bundle.inputData.specificKeyYouCareAbout !== projectOnEachLine) { | |
// Return an empty array to not display the field | |
return []; | |
} | |
// Do some call here or return some field with all the standard | |
// inputField keys / values. This is where you'd add your line | |
// project field. | |
return { ... } | |
} | |
module.exports = { | |
// Key / noun / display stuff here | |
operation: { | |
inputFields: [ | |
{ | |
// key / label / etc here | |
key: 'specificKeyYouCareAbout', | |
// This tells Zapier that whenever this field is updated we | |
// should refresh the other fields. The method below will | |
// get the updated field information and be executed again. | |
altersDynamicFields: true, | |
}, | |
methodNameToAddFieldBasedOnAbove, | |
], | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment