# Making number of views dynamic with carousel component

**URL:** <https://forum.inductiveautomation.com/t/making-number-of-views-dynamic-with-carousel-component/90886>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 24, 2024, 4:40pm UTC](https://forum.inductiveautomation.com/t/making-number-of-views-dynamic-with-carousel-component/90886 "2024-05-24T16:40:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JKJ](https://avatars.discourse-cdn.com/v4/letter/j/3be4f8/32.png) [@JKJ](https://forum.inductiveautomation.com/u/JKJ)\
**Post date:** [May 24, 2024, 4:40pm UTC](https://forum.inductiveautomation.com/t/making-number-of-views-dynamic-with-carousel-component/90886/1 "2024-05-24T16:40:06Z")

</div>

What is the best way to make the number of views on a carousel dynamic? For example: I have 4 views for 4 different machines, but I want to disable the view for a machine if that particular machine is not running.

---

<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:** [May 24, 2024, 4:44pm UTC](https://forum.inductiveautomation.com/t/making-number-of-views-dynamic-with-carousel-component/90886/2 "2024-05-24T16:44:37Z")

</div>

And what do you want to happen if someone has that view open?  
Is there a chance they won't notice that the view has switched and make a mistake as a result?

Why not leave the number of views the same but switch out the views for a "Machine Offline" view?

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [May 24, 2024, 4:56pm UTC](https://forum.inductiveautomation.com/t/making-number-of-views-dynamic-with-carousel-component/90886/3 "2024-05-24T16:56:52Z")

</div>

I do something like this, there might be a better way... but I created a custom prop which defines the instances. I add one prop per instance that defines visibility (true/false). I then bind the actual instances prop of the carousel to this custom prop and using a transform I only pass the instances that should be visible.

Hope that made sense.

Edit, in the custom prop, I can bind the visible prop to something that could make it dynamic.

---

<div class="post-metadata">

**Author:** ![JKJ](https://avatars.discourse-cdn.com/v4/letter/j/3be4f8/32.png) [@JKJ](https://forum.inductiveautomation.com/u/JKJ)\
**Post date:** [June 3, 2024, 7:51pm UTC](https://forum.inductiveautomation.com/t/making-number-of-views-dynamic-with-carousel-component/90886/4 "2024-06-03T19:51:31Z")

</div>

This is a dashboard display that has autoplay enabled, and cycles through each view that shows the status of that machine. I would like to disable the view for a machine that is not running so operators don't have to wait for the carousel to cycle through machines that are not running to see the ones that are. I hope that makes sense?  
What type of transform are you using? And are you binding to the views prop or each individual view?
