Skip to main content
Question

Same children fields in a different parent fields

  • February 24, 2021
  • 2 replies
  • 120 views

I have a `create` with a fields structure like:

inputFields: [
    {
        key: 'parent1',
        children: [
            {
                key: 'child1',
                label: 'Child1',
                type: 'string',
            },
            {
                key: 'child2',
                label: 'Child2',
                type: 'string',
            },
        ],
    },
    {
        key: 'parent2',
        children: [
            {
                key: 'child1',
                label: 'Child1',
                type: 'string',
            },
            {
                key: 'child2',
                label: 'Child2',
                type: 'string',
            },
        ],
    },
]

And in this case only the `parent2` group will be displayed in UI of the action.

Isn’t it a bug in UI as parent keys are different?

Did this topic help you find an answer to your question?
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

ikbelkirasan
Forum|alt.badge.img+12
  • Zapier Expert
  • 555 replies
  • February 25, 2021

Hi @Alexandr - I also think this is a bug. As a workaround, try renaming the nested keys to `parent1.child1`, `parent1.child2`...etc then in the perform function, remap them to whatever you want.


  • Author
  • Beginner
  • 1 reply
  • February 25, 2021

Hi @ikbelkirasan. Thank you for your response. I tried your suggestion. So renaming of the keys works and I received bundle.inputData as 

{
    'parent1.child1': '1',
    'parent1.child2': '2',
    'parent2.child1': '3',
    'parent2.child2': '4',
    parent2: [ { 'parent2.child1': '3', 'parent2.child2': '4' } ],
    parent1: [ { 'parent1.child1': '1', 'parent1.child2': '2' } ],
}

Yes, I can convert keys as I need, but it looks like a hack.

If it’s a bug, how I can open an issue to fix it in zapier?