# Dynamic Menu Trees in Perspective

**URL:** <https://forum.inductiveautomation.com/t/dynamic-menu-trees-in-perspective/24134>\
**Category:** Ignition\
**Created:** [April 15, 2019, 1:03am UTC](https://forum.inductiveautomation.com/t/dynamic-menu-trees-in-perspective/24134 "2019-04-15T01:03:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteveE](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/stevee/32/14460_2.png) [@SteveE](https://forum.inductiveautomation.com/u/SteveE)\
**Post date:** [April 15, 2019, 1:03am UTC](https://forum.inductiveautomation.com/t/dynamic-menu-trees-in-perspective/24134/1 "2019-04-15T01:03:38Z")

</div>

Is it possible to have a dynamic menu tree?

I can wall views away from users depending on the view permissions but can I hide menu items so that restricted users can’t navigate to those pages?

So I added a custom property to the menu called SecurityLevels and bound that to session.props.auth.securityLevels

Wrote a change script so that whenever the user changed (or their clearance) then the menu would get rebuilt - all good so far

Apart from…

I’m really struggling parsing the returned securityLevels. I initially put it in the too hard basket and just converted it to a string and did:

```
securityLevels = str(currentValue.value)

if "Line 1" in securityLevels:
	menu.append(menuLine1)
if "Line 4" in securityLevels:
	menu.append(menuLine4)

```

But this isn’t working too well for reasons that are beyond me at the moment

Edit: Ah! Added a script transform to my securityLevels custom property which transformed it to return str(value) and all is good in the hood
