# Filter linked to a menu bar in perspective

**URL:** <https://forum.inductiveautomation.com/t/filter-linked-to-a-menu-bar-in-perspective/60993>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [June 21, 2022, 10:46am UTC](https://forum.inductiveautomation.com/t/filter-linked-to-a-menu-bar-in-perspective/60993 "2022-06-21T10:46:16Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [March 30, 2023, 2:10pm UTC](https://forum.inductiveautomation.com/t/filter-linked-to-a-menu-bar-in-perspective/60993/21 "2023-03-30T14:10:37Z")

</div>

I'm going to assume menu bar means menu tree, and that the memory tag is used to populate the `allItems` property.

If that's not the case, please correct me, and also try to be a bit more explicit.

First question: Do you really mean to have the machines names in a submenu ?  
Are you going to put more elements in your menu ?

Second question: What doesn't work ?  
I can see there's a script eval error, we need to see that error.  
But I'm going to try and guess: indentation error. If that's the case, you need to be more careful when pasting code:

- Python uses indentation for scope, and scoping is quite important in code
- You can use either spaces or tabs to indent a block, but not a mix of both.

---

<div class="post-metadata">

**Author:** ![kiran\_kale1](https://avatars.discourse-cdn.com/v4/letter/k/7993a0/32.png) [@kiran\_kale1](https://forum.inductiveautomation.com/u/kiran_kale1)\
**Post date:** [March 30, 2023, 2:26pm UTC](https://forum.inductiveautomation.com/t/filter-linked-to-a-menu-bar-in-perspective/60993/22 "2023-03-30T14:26:11Z")

</div>

**First question: Do you really mean to have the machines names in a submenu ?**  
**Are you going to put more elements in your menu ?**  
i have many much machines on same menu tree .  
below is the Hierarchy  
Enterprise -Facility-Area-Production Line-Work Unit- Work center.  
my customer want directly he will search the machine by name

Regards,  
Kiran

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [March 30, 2023, 2:28pm UTC](https://forum.inductiveautomation.com/t/filter-linked-to-a-menu-bar-in-perspective/60993/23 "2023-03-30T14:28:23Z")

</div>

The machines don't appear in that hierarchy. Where should they go ?  
Is the hierarchy always the same ?

Did you try fixing the indentation as I mentioned above ?

---

<div class="post-metadata">

**Author:** ![kiran\_kale1](https://avatars.discourse-cdn.com/v4/letter/k/7993a0/32.png) [@kiran\_kale1](https://forum.inductiveautomation.com/u/kiran_kale1)\
**Post date:** [March 30, 2023, 2:54pm UTC](https://forum.inductiveautomation.com/t/filter-linked-to-a-menu-bar-in-perspective/60993/24 "2023-03-30T14:54:59Z")

</div>

![Tree menu](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/2/520862baaf8393314e0422944de2da9f2b6d6e53.png)  
Hii,  
actually, i am using tree for that i want the search option,  
operator will search the machine by name.

---

<div class="post-metadata">

**Author:** ![kiran\_kale1](https://avatars.discourse-cdn.com/v4/letter/k/7993a0/32.png) [@kiran\_kale1](https://forum.inductiveautomation.com/u/kiran_kale1)\
**Post date:** [March 31, 2023, 5:06am UTC](https://forum.inductiveautomation.com/t/filter-linked-to-a-menu-bar-in-perspective/60993/25 "2023-03-31T05:06:41Z")

</div>

Hii guys,  
anybody has done this before.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [March 31, 2023, 8:37am UTC](https://forum.inductiveautomation.com/t/filter-linked-to-a-menu-bar-in-perspective/60993/26 "2023-03-31T08:37:03Z")

</div>

> [@pascal.fragnoud](#):
>
> Did you try fixing the indentation as I mentioned above ?

Try this.

---

<div class="post-metadata">

**Author:** ![kiran\_kale1](https://avatars.discourse-cdn.com/v4/letter/k/7993a0/32.png) [@kiran\_kale1](https://forum.inductiveautomation.com/u/kiran_kale1)\
**Post date:** [March 31, 2023, 9:46am UTC](https://forum.inductiveautomation.com/t/filter-linked-to-a-menu-bar-in-perspective/60993/27 "2023-03-31T09:46:40Z")

</div>

yes, I did but problem remains same

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [March 31, 2023, 9:56am UTC](https://forum.inductiveautomation.com/t/filter-linked-to-a-menu-bar-in-perspective/60993/28 "2023-03-31T09:56:59Z")

</div>

So, what are the details of the `Error_ScriptEval` you get ?

[Previous page](https://forum.inductiveautomation.com/t/filter-linked-to-a-menu-bar-in-perspective/60993.md?page=1)
