Question

Same children fields in a different parent fields

  • 24 February 2021
  • 2 replies
  • 115 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?


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

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?

Userlevel 7
Badge +12

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.