# Working with showif in subfields

**URL:** <https://forum.builder.io/t/working-with-showif-in-subfields/5096>\
**Category:** Technical Questions\
**Created:** [March 4, 2024, 10:38am UTC](https://forum.builder.io/t/working-with-showif-in-subfields/5096 "2024-03-04T10:38:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rythm](https://avatars.discourse-cdn.com/v4/letter/r/eb9ed0/32.png) [@rythm](https://forum.builder.io/u/rythm)\
**Post date:** [March 4, 2024, 10:38am UTC](https://forum.builder.io/t/working-with-showif-in-subfields/5096/1 "2024-03-04T10:38:15Z")

</div>

so I have a custom component which consists of lists of lists.  
and under the sublist, I have an input which is dynamic to the sibling input under the same hierarchy.

```auto
Builder.registerComponent(Counter, {
  name: "Counter",
  inputs: [
    {
      name: "counterName",
      type: 'text'
    },
    {
      name: 'initialCount',
      type: 'number'
    },
    {
      name: 'layout',
      type: 'html'
    },
    {
      name:'mylist',
      type:'list',
      subFields:[
        {
          name:"element",
          type:'string',
          enum:['hello','world']
        },
        {
          name:'sublist',
          type:'list',
          subFields:[
            {
              name:'subchildtext',
              enum:['hellochild','worldchild'],
              type:'string',

            },
            {
              name:'marks',
              type:'number',
              showIf:`options.get('subchildtext')==='hellochild'`,
              
            }
          ]
        }

      ],

    }
  ]
});

```

now I want to know if there is a way to make the “marks” to dynamically show on the basis of input that we have in field “element” rather than the field “subchildtext”

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [March 5, 2024, 12:03pm UTC](https://forum.builder.io/t/working-with-showif-in-subfields/5096/2 "2024-03-05T12:03:23Z")

</div>

Hello @rythm,

You may find help at [Get parent block in Builder.registerComponent - #7 by korey](https://forum.builder.io/t/get-parent-block-in-builder-registercomponent/570/7)
