# \<control\>:setSlot doesn't move a control to the current page

**URL:** <https://forum.electra.one/t/control-setslot-doesnt-move-a-control-to-the-current-page/2297>\
**Category:** Bug reports\
**Created:** [July 28, 2023, 9:52am UTC](https://forum.electra.one/t/control-setslot-doesnt-move-a-control-to-the-current-page/2297 "2023-07-28T09:52:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mint-Gecko](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Mint-Gecko](https://forum.electra.one/u/Mint-Gecko)\
**Post date:** [July 28, 2023, 9:52am UTC](https://forum.electra.one/t/control-setslot-doesnt-move-a-control-to-the-current-page/2297/1 "2023-07-28T09:52:10Z")

</div>

According to the docs ([Preset Lua extension | Electra One Documentation](https://docs.electra.one/developers/luaext.html#control)), the function `<control>:setSlot (slot)` should do the following:

```auto
Moves given control to a preset slot on the current page. 

```

This doesn’t seem to be the case over here (E1 mkII, v3.4). The following preset demonstrates the problem: [Electra One App](https://app.electra.one/preset/h9haAkeawFMVDk9xPg8q)

Just start the preset. The script should move the fader control from page two to the current page (page 1 is the startup page) to slot 1. Moving to slot 1 works but the control does not appear on the current page! Check page 2 or the debugger to verify that the control stays on page 2.

---

<div class="post-metadata">

**Author:** ![oldgearguy](https://avatars.discourse-cdn.com/v4/letter/o/f4b2a3/32.png) [@oldgearguy](https://forum.electra.one/u/oldgearguy)\
**Post date:** [July 28, 2023, 12:38pm UTC](https://forum.electra.one/t/control-setslot-doesnt-move-a-control-to-the-current-page/2297/2 "2023-07-28T12:38:08Z")

</div>

I’ve always taken that command to just manipulate controls on the same page.  
I think I tried moving controls from page to page way back when I was first playing around and it didn’t work.

There may have been a comment from Martin about that on the forum.  
Otherwise, it would be a great way to have a ‘parking lot’ page of controls that are needed from time to time and then just move them to the current page when needed.

That would be easier/cleaner than trying to dynamically reconfigure a control (change min/max/range/name/type/color/etc)

---

<div class="post-metadata">

**Author:** ![jhh](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/jhh/32/951_2.png) [@jhh](https://forum.electra.one/u/jhh)\
**Post date:** [July 28, 2023, 12:41pm UTC](https://forum.electra.one/t/control-setslot-doesnt-move-a-control-to-the-current-page/2297/3 "2023-07-28T12:41:44Z")

</div>

@martin if setSlot would work across different pages, this would be an alternative/intermediate way to implement different preset views (as mentioned in an earlier message)

---

<div class="post-metadata">

**Author:** ![Mint-Gecko](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Mint-Gecko](https://forum.electra.one/u/Mint-Gecko)\
**Post date:** [July 28, 2023, 1:03pm UTC](https://forum.electra.one/t/control-setslot-doesnt-move-a-control-to-the-current-page/2297/4 "2023-07-28T13:03:21Z")

</div>

I’m building a generic synth plugin preset that is controlled from a custom DAW plugin. Since I want it to support any VST, I have to be able to show up to 36 faders, up to 36 buttons, up to 36 any other supported controls or a mix of these with a total of 36 visible controls.

Therefore, I instantiate every control type 36 times on a dedicated page. So 36 faders on page 1, 36 buttons on page 2, and so on.

I’m looking for a way to move a control from page 2 to page 1 at runtime, so I can configure the controls depending on what synth is opened in my DAW. Is there a way to do that with E1’s LUA API?

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [August 1, 2023, 6:01am UTC](https://forum.electra.one/t/control-setslot-doesnt-move-a-control-to-the-current-page/2297/5 "2023-08-01T06:01:06Z")

</div>

I will, as the first step, make it possible to move controls between the pages. That should be fairly easy to implement. And that would work on both mk1 and mk2. Even though the “parking lot” page idea sounds simple, it brings quite some troubles on both, the controller and the editor side.

Next to that I am going to try to enable dynamic creation of controls. That means that instead of using a pool of existing controls and reconfiguring them, one would create them on the fly. It should be fairly easy to do on mk2, possibly impossible on mk1.

---

<div class="post-metadata">

**Author:** ![Mint-Gecko](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Mint-Gecko](https://forum.electra.one/u/Mint-Gecko)\
**Post date:** [August 1, 2023, 8:14am UTC](https://forum.electra.one/t/control-setslot-doesnt-move-a-control-to-the-current-page/2297/6 "2023-08-01T08:14:26Z")

</div>

That sounds great, I’m really looking forward to this!

Will it be possible to change the list elements of a list control?
