Best answer

Setting the value of bundle field and passing it to other methods in the Zapier Legacy code

  • 28 September 2020
  • 2 replies
  • 214 views

I am using the Zapier Legacy code and I have created a computed field inside the Authentication. This computed field is updated with a value in the check_pre_roll method and I want to use the updated field on other upload and update methods but the value is null. How can I save the new value in the bundle field (bundle.auth.location) from within the check_pre_roll method and then use it in any other pre/post-roll methods? The default value is null.

icon

Best answer by Zane 30 September 2020, 00:46

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +9

Hi @aditim - First thing I’d check is whether you are using OAuth or Session authentication methods - these are the only ones that support “computed” fields.  

https://zapier.github.io/zapier-platform/#computed-fields

Next I’d make sure, outside of auth logic, make you’re referencing the computed field on the bundle.authData object, rather than the fields collection.  This can be a tricky one to remember (for me at least!)

If that doesn’t get you up and running, let us know and we can look for a different way to accomplish what you need. 

Hi @Zane ,

Thanks for the reply. I am using the Zapier legacy platform and not the CLI. `bundle.auth_fields.location ` is how the computed field is being accessed inside the method and it does change the value to the new value but it does not pertain it globally. When I access the bundle.auth_fields.location at another place it still shows null. Is there a way to pass the value to another method or have the updated value stored globally?