# Alternate containers

**URL:** <https://forum.inductiveautomation.com/t/alternate-containers/105107>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [April 15, 2025, 12:19pm UTC](https://forum.inductiveautomation.com/t/alternate-containers/105107 "2025-04-15T12:19:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![buelens.g](https://avatars.discourse-cdn.com/v4/letter/b/f4b2a3/32.png) [@buelens.g](https://forum.inductiveautomation.com/u/buelens.g)\
**Post date:** [April 15, 2025, 12:19pm UTC](https://forum.inductiveautomation.com/t/alternate-containers/105107/1 "2025-04-15T12:19:29Z")

</div>

Hello,

I am a new user and I am looking to have a part of the screen (see example red containers) that should completely switch every 10 seconds. The containers contain text as well as OPC tags. So, to summarize, the red (2 containers) I call them A-B and C-D should appear on the screen for 10 seconds as A-B, then 10 seconds as C-D, and then back to 10 seconds as A-B, and so on. Since I am new, I am posting this question here and hopefully someone can help with this?

Its not the complete screen just a part of the screen!

Thanks in advance,  
Geert

 ![screen](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/9/59cece8ce74bb10f186e438da53688fb68898fb9.jpeg)

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [April 15, 2025, 3:37pm UTC](https://forum.inductiveautomation.com/t/alternate-containers/105107/2 "2025-04-15T15:37:00Z")

</div>

~~Flex repeater in carousel component would probably work. Flex repeater would show the two instances per 'page' of the carousel. Carousel would handle the switching of views every 10s.  
 ~~

Edit: Got me with the mention of container, thought it was perspective.

Assuming A,B,C &D are all the same display with just different tags bound to the data displays, make a single template and use indirect bindings. Then, have the red area be one template repeater with two instances of your template, and then use a timer component to manage the parameters dataset change on the repeater.

> **[Vision - Template Repeater | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/components/vision-components/containers/template-repeater)**
>
> The Report Viewer component provides a way to run and view Reports in Vision windows.

If they are not the same basic view/display, then you would need to use a template canvas and again, utilize a timer to swap driving datasets every 10s.

---

<div class="post-metadata">

**Author:** ![msteele](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/msteele/32/77889_2.png) [@msteele](https://forum.inductiveautomation.com/u/msteele)\
**Post date:** [April 15, 2025, 3:41pm UTC](https://forum.inductiveautomation.com/t/alternate-containers/105107/3 "2025-04-15T15:41:16Z")

</div>

Use a flex column view that contains the 4 rows in your picture. Nest a flex row container as the 3rd row in your picture, the container will include two embedded views inside it.

For each embedded view, create a binding to the viewPath that changes based on whatever conditions you want, such as a timer.

For something with this level of logic, I'd suggest doing the embedded viewPath bindings as custom properties within your parent view, and put your expressions and any supporting expressions there. e.g. `view.custom.embed1ViewPath` and `view.custom.embed2ViewPath`. Then inside your embedded views, you do a property binding to those view custom properties.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 15, 2025, 3:44pm UTC](https://forum.inductiveautomation.com/t/alternate-containers/105107/4 "2025-04-15T15:44:17Z")

</div>

@ryan.white / @msteele, the question is tagged as Vision, not Perspective. Oops?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 15, 2025, 4:42pm UTC](https://forum.inductiveautomation.com/t/alternate-containers/105107/5 "2025-04-15T16:42:25Z")

</div>

The **simplest** solution to this problem in Vision is to just have both sets of containers on the screen and bind their visible property to some toggling bit.

For example:

1. Add a custom property to the root container of boolean type.
2. Add an expression binding:

```python
getSecond(now(1000)) % 20 >= 10

```

This will, every one second (1000ms) get the current integer second (0-59), divide it by 20 _keeping the remainder_ (so instead of 0-60, you get 0-19, 0-19, 0-19 per minute), and then check whether that value is greater than or equal to 10. Thus, every ten seconds the output will swap from true to false and back.
3. Bind your container's visible property to this custom property. If you want, you could even put AB and CD in a distinct container, and bind _that_ container's visible property.
4. Set the root container's `Combine Repaints` property true, so that toggling both components visible status at once doesn't cause unpleasant flashing.

[ContainerSwitch.zip](https://forum.inductiveautomation.com/uploads/short-url/g5eJLJACrObA4jINk4s6bhvrTgx.zip) (4.6 KB)
