# Filter Option List based on Virtual Param

**URL:** <https://forum.electra.one/t/filter-option-list-based-on-virtual-param/3229>\
**Category:** Developers\
**Created:** [September 11, 2024, 7:42am UTC](https://forum.electra.one/t/filter-option-list-based-on-virtual-param/3229 "2024-09-11T07:42:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Grappa](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Grappa](https://forum.electra.one/u/Grappa)\
**Post date:** [September 11, 2024, 7:42am UTC](https://forum.electra.one/t/filter-option-list-based-on-virtual-param/3229/1 "2024-09-11T07:42:42Z")

</div>

Hi all,

Had my E1 for a week and totally loving it! I’ve also been diving into the docs and posts on the forum to try and get my head around its capabilities.

I’m working on extending the capabilities of an existing preset and want to add some functionality - but before I dig too deep (and potentially waste a chunk of time) I’d appreciate if someone can point me in the right direction in terms of approach and feasibility!

In ‘simple’ terms I want to filter the an options list based on the option selected from another options list. I basically have a set of modulation targets each of which has a unique set of options for that target type.

Current thinking is to create an option list with all of the modulation targets (defined as virtual type) and also create an option list with all of the target options defined as midi CC with relevant values: A LUA script would then be used to filter the control options to only the items from the target options list enumerated from the target virtual parameter value;

As an example;  
Target  
Mixer = Option List Index 0 (Virtual Value of 0)  
Target Options:  
Osc A = Option List Index 0 (CC value 0)  
Osc B = Option List Index 1 (CC Value 1)  
Noise = Option List Index 2 (CC Value 2)  
Filt Env = Option List Index 3 (CC Value 3) - this is not an option applicable to the ‘Mixer’ Target Type so…

Pseudo code: If Target.Selected = [Index: 0] then Target.Options = [Index: 0,1,2].

I hope this makes sense!

Is this possible? If it is and anyone could point me to some code or docs that can shed some light on the approach I’d be eternally grateful.

Regards,

Si

---

<div class="post-metadata">

**Author:** ![Grappa](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Grappa](https://forum.electra.one/u/Grappa)\
**Post date:** [September 11, 2024, 2:02pm UTC](https://forum.electra.one/t/filter-option-list-based-on-virtual-param/3229/2 "2024-09-11T14:02:44Z")

</div>

Seems like these might be the answer… will dig in tonight…

> [@Beta v3.5 - Dynamic lists](https://forum.electra.one/t/beta-v3-5-dynamic-lists/2423):
>
> A preset to demonstrate dynamic changes of the Overlay lists based on the state of another control. The dynamic lists are meant to be used anywhere where meaning of one parameter changes in context of another parameter value. [https://app.electra.one/preset/6UGrmEWItRnVvipIMvEk](https://app.electra.one/preset/6UGrmEWItRnVvipIMvEk) Note, I will adjust the web editor so that the overlay IDs are visible there. I will also separate the Overlay editor from the list editor in near future.
