Question

Dynamic Number of Fields


Userlevel 1

So, I’ve reviewed everything I can find in the community about this topic and don’t see anything directly on point.  I am using a form tool (DecisionVault) to gather information from clients.  Some of this information includes birthdates of their children.  There is a field for date of birth for each child (e.g. child1_dob, child2_dob, child3_dob, etc.). These show up in the record coming in from the Zap step requesting the contact information from the form software.  The number of children is obviously variable and the form software just adds more fields as needed.  What I need to do is iterate over all of the dob fields and determine if any of the children are minors.  I plan to use date math to determine if they are minors or not.  The problems I’m having are 1) how to handle the fact that the fields can vary based on number of children and 2) how can I just pull out all of the dob fields from the recordset and parse those.  What I think would work for 1) is using a wildcard, but I don’t know if that’s possible in Zapier (i.e. child*_dob).  I don’t really know how to solve 1) other than I could go to a webhook API request and parse the result in Code by Zapier.  Any ideas?


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

3 replies

Userlevel 4
Badge +6

Hi @smittym 

Welcome to the Community!

You mentioned the trigger app is DecisionVault. What action app are you going to use for this workflow?

Userlevel 1

Well, DecisionVault is both the trigger and the action app.  I am listening for a form submission from DecisionVault which gives me part of the data I need and then sending an action back to DecisionVault to get the contacts information.  Then I plan to use Zapier Formatter to do the date math.  This is all within a sub-Zap that will send the final answer about whether there are minors involved or not to a main Zap with a ChatGPT action.

Userlevel 7
Badge +12

Hi @smittym!

In terms of running the maths steps on the date fields, no matter how many fields there are, you can do that using Looping by Zapier. If you have a comma separated list of the dates of birth, Looping can run through a series of actions for each one. 

In terms of parsing out the date of birth data from the trigger, it sounds like you’re receiving a webhook from Decision vault. Is that right? If so, you may want to ask a question in the Code and Webhooks section of the Community to see if someone can help you to parse the data that you’re getting from the webhook and parse out the dates. 

​I hope that helps, please let us know if you have any questions!