# Bug: system.perspective.alterdock doesn't work correctly if more than 1 dock is defined

**URL:** <https://forum.inductiveautomation.com/t/bug-system-perspective-alterdock-doesnt-work-correctly-if-more-than-1-dock-is-defined/112235>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 17, 2025, 4:46pm UTC](https://forum.inductiveautomation.com/t/bug-system-perspective-alterdock-doesnt-work-correctly-if-more-than-1-dock-is-defined/112235 "2025-11-17T16:46:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nol](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@Nol](https://forum.inductiveautomation.com/u/Nol)\
**Post date:** [November 17, 2025, 4:46pm UTC](https://forum.inductiveautomation.com/t/bug-system-perspective-alterdock-doesnt-work-correctly-if-more-than-1-dock-is-defined/112235/1 "2025-11-17T16:46:04Z")

</div>

8.3

I have a dock mounted on the right called right\_faceplate, on it there are two buttons, small, and large, which execute this on click. With size either 500 or 800. The idea is to have a faceplate with the trend on it and when they click on large it expands to show the trend larger.

```python
		system.perspective.alterDock('right_faceplate', { 'size': 500 } )

```

I built this in a dev environment and it worked fine but when I tried to push it into a larger project it would not work. Eventually I troubleshooted it down to it only seems to work if there is only one faceplate defined in the page configuration. If only right\_faceplate is defined the small and large buttons work perfectly going back and forth size. If I add right\_test, even though it isn’t referenced anywhere in the project, the code breaks and no longer works correctly. Clicking either button appears to briefly try to change the size for a single frame then the dock disappears and it launches right\_test.

Some additional testing led me to find the following:

- Alterdock properly sets the size of the requested faceplate, this happens regardless if faceplate\_right is open, a different dock is open, or there is no dock open at all.
- The bug only occurs if the requested faceplate is open at the time alterddock is called. Then alterdock sets the correct dock size but then opens a different faceplate
- It always opens the same, wrong, faceplate. Even adding a third dock into the mix, it always appears to open the same incorrect one each time.
- The dock\_ids are never affected, every combination of dock still correctly responds to .closeDock and .openDock.
- It also only happens when docks are set to ‘onDemand’. Changing it to visible or auto removes the issue.
- Deleting right\_faceplate, then re-adding it so it’s at the bottom of the list of docks then shifts the bug to always show it when running alterdock on a different dock.

Which leads me to believe:

- Something in the backend code of alterdock, is referencing the wrong dock, only when the altered dock is already open.

Also this spaghetti fix correctly works and bypasses the issue, though occasionally there is a visual flicker while it’s executing which is mildly annoying:

```python
			system.perspective.closeDock('right_faceplate')
			system.perspective.alterDock('right_faceplate', { 'size': 500 } )
			system.perspective.openDock('right_faceplate')

```

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/4/04e3fec9f352a714a90030036a5c10c15feaa420.png)

The buttons to replicate different scenarios and test:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/6/9653a6964f6e7b916ffca23563c1e68917180d86.png)

---

<div class="post-metadata">

**Author:** ![Nol](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@Nol](https://forum.inductiveautomation.com/u/Nol)\
**Post date:** [November 17, 2025, 4:47pm UTC](https://forum.inductiveautomation.com/t/bug-system-perspective-alterdock-doesnt-work-correctly-if-more-than-1-dock-is-defined/112235/2 "2025-11-17T16:47:42Z")

</div>

I did find this reference when trying to originally look into this issue. I thought I’d post my findings in hopes of this issue getting some attention as the original issue from 2022 still hasn’t been looked at. I hope narrowing it down and providing more troubleshooting steps can maybe get IA to consider looking at this.

> [@\[IGN-6743\] system.perspective.alterDock can only resize one dock at a time?](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/2):
>
> alterDock takes a dockID as a required parameter. Are your docks the same ID and only 1 is being affected? If this is your case, I would create 3 unique dockIDs and call the function 3 times. ex. dockConfig = {} system.perspective.alterDock(leftDock, dockConfig) system.perspective.alterDock(rightDock, dockConfig) system.perspective.alterDock(topDock, dockConfig)
