# Tab viewPath not rendering selected view

**URL:** <https://forum.inductiveautomation.com/t/tab-viewpath-not-rendering-selected-view/76613>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [July 19, 2023, 8:56pm UTC](https://forum.inductiveautomation.com/t/tab-viewpath-not-rendering-selected-view/76613 "2023-07-19T20:56:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ian.sebryk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ian.sebryk/32/49319_2.png) [@ian.sebryk](https://forum.inductiveautomation.com/u/ian.sebryk)\
**Post date:** [July 19, 2023, 8:56pm UTC](https://forum.inductiveautomation.com/t/tab-viewpath-not-rendering-selected-view/76613/1 "2023-07-19T20:56:16Z")

</div>

following the manual on Tabs:

> If the element is changed to an object data type, then the text on the tab can be set by adding a **text** value member to the object and providing a string, as seen on element 0 below. Alternatively, **viewPath** (value data type) and **viewParams** (object data type) can be added to the element, which allows you to render a view inside the tab as well as pass parameters to it.

i created a tab and changed the element to and object and populated it. but it doesn't render. ☹ what am i missing?

 ![missingTabContent](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/6/66a1c8092bfd113fc1d8883265bf59fd8cf0d5ca.jpeg)

i also get an odd error in the top right corner:

```auto
tab[0] object found, String expected
tab[1] object found, String expected

```

EDIT: here's an unobstructed image of the props:  
 ![Screenshot 2023-07-19 150447](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/e/4edda25b88e4aaf9c63fd65994fb2d494ca9adde.png)

EDIT 2: does this only control **the tab itself!?**

EDIT3: **it only controls the tab itself. not it's contents.** the manual could use better wording...

---

<div class="post-metadata">

**Author:** ![Usman\_Ashraf](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/usman_ashraf/32/43168_2.png) [@Usman\_Ashraf](https://forum.inductiveautomation.com/u/Usman_Ashraf)\
**Post date:** [July 20, 2023, 2:17pm UTC](https://forum.inductiveautomation.com/t/tab-viewpath-not-rendering-selected-view/76613/2 "2023-07-20T14:17:33Z")

</div>

Hi @ian.sebryk

I tried what you have said and you are right, the tabs are not showing the embedded view. So I tried another approach. I converted the tabs array indexes into strings

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/b/eb8e097b7336d09c44b0c8ff448b9b940a1ef077.png)

The inside each tab I added an embedded view component.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/8/d8beb01b0ee031546087516f71ac3cae5ba3d96e.png)

And now my embedded views are showing inside the tab container.

I hope this trick helps, however it needs to be seen why the embedded views are not showing directly inside the tab container as per the documentation.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [July 20, 2023, 2:22pm UTC](https://forum.inductiveautomation.com/t/tab-viewpath-not-rendering-selected-view/76613/3 "2023-07-20T14:22:31Z")

</div>

> [@ian.sebryk](#):
>
> i created a tab and changed the element to and object and populated it. but it doesn't render. ☹ what am i missing?

Are you trying to render an embeded view **as** the tab? If not, then what @Usman_Ashraf has shown is the correct method.

If you are, then I am not sure why it isn't rendering. Perhaps @cmallonee has some insight?

Might want to provide Ignition Version.

EDIT:

I will say, that bit of the manual can be a bit misleading and it took me a few times before I was clear. The real give away for what they are saying can be accomplished is the provided image.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/b/ab87ddc864341e0c7a23b0ed3c7edbcf24a57eee.png)  
The highlighted portion of the image _ **is** _ the tabs of the tab control.

---

<div class="post-metadata">

**Author:** ![ian.sebryk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ian.sebryk/32/49319_2.png) [@ian.sebryk](https://forum.inductiveautomation.com/u/ian.sebryk)\
**Post date:** [July 20, 2023, 2:55pm UTC](https://forum.inductiveautomation.com/t/tab-viewpath-not-rendering-selected-view/76613/4 "2023-07-20T14:55:32Z")

</div>

i was trying to find a workaround for the fact that you can't change the `display` of a particular tab. and in setting the tab's indicies to `object`, i could add the `disabled` property. what i was expecting was the `viewPath` property to populate the tab _contents_, not the tab _itself_. and, oddly enough, the errors that display, expecting strings, doesn't hamper the functioning of the tab-as-object. 🤷

so, thank you for helping me clear up the functional differences there. 👍

---

<div class="post-metadata">

**Author:** ![Usman\_Ashraf](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/usman_ashraf/32/43168_2.png) [@Usman\_Ashraf](https://forum.inductiveautomation.com/u/Usman_Ashraf)\
**Post date:** [July 20, 2023, 3:03pm UTC](https://forum.inductiveautomation.com/t/tab-viewpath-not-rendering-selected-view/76613/5 "2023-07-20T15:03:25Z")

</div>

Ahaaaan, this makes sense. Thank you

---

<div class="post-metadata">

**Author:** ![ian.sebryk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ian.sebryk/32/49319_2.png) [@ian.sebryk](https://forum.inductiveautomation.com/u/ian.sebryk)\
**Post date:** [July 20, 2023, 3:14pm UTC](https://forum.inductiveautomation.com/t/tab-viewpath-not-rendering-selected-view/76613/6 "2023-07-20T15:14:50Z")

</div>

yeah. tricky wording in the manual, eh? oh well. at least we have a pretty decent manual. some wares i've worked with have manuals written _by_ hardcore engineers _for_ hardcore engineers. nightmare. 😱
