# \[FEATURE-1855\] Security Level Name in Expression

**URL:** <https://forum.inductiveautomation.com/t/feature-1855-security-level-name-in-expression/43414>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [February 15, 2021, 12:59pm UTC](https://forum.inductiveautomation.com/t/feature-1855-security-level-name-in-expression/43414 "2021-02-15T12:59:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [February 15, 2021, 12:59pm UTC](https://forum.inductiveautomation.com/t/feature-1855-security-level-name-in-expression/43414/1 "2021-02-15T12:59:33Z")

</div>

Hi,

Is there any way to get the name of the security level that you are defining a rule expression for?  
I would something that would return ‘testLevel’ in the place of `{this.levelName}`

`runscript("Security.roles.test('"+{this.levelName}+"','"+{attribute-source:idTokenClaims:preferred_username}+"')")`

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/7/a779c865ff09f8f2f7d67938339f85a614a904d8.png)

This way I can have the same expression for every level, and the script module can apply the rules.

Regards,  
Deon

---

<div class="post-metadata">

**Author:** ![jspecht](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jspecht/32/6465_2.png) [@jspecht](https://forum.inductiveautomation.com/u/jspecht)\
**Post date:** [February 16, 2021, 6:46pm UTC](https://forum.inductiveautomation.com/t/feature-1855-security-level-name-in-expression/43414/2 "2021-02-16T18:46:26Z")

</div>

Unfortunately I do not see a way to grab the security level name from the expression, so I’m afraid you’ll have to hard-code the name into each rule for now. I’ve added an internal feature ticket to add the ability to grab the name.
