# Expression/Jython

**URL:** <https://forum.inductiveautomation.com/t/expression-jython/1084>\
**Category:** Archived Topics\
**Created:** [April 13, 2009, 9:58pm UTC](https://forum.inductiveautomation.com/t/expression-jython/1084 "2009-04-13T21:58:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrtweaver](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@mrtweaver](https://forum.inductiveautomation.com/u/mrtweaver)\
**Post date:** [April 13, 2009, 9:58pm UTC](https://forum.inductiveautomation.com/t/expression-jython/1084/1 "2009-04-13T21:58:57Z")

</div>

I know that the two are different and are used differently. Such as Jython using the FPMI usualy goes under buttons and other type action items. Where as Expression is used in other location.

My question is: Is there a way to use the FPMI.SECURITY.GETROLES() in an IF statement in something that used expression?

What I want to do is have a query against a data base. If you have say level4 or higher the where clause will contain this, if you are under a level4 the where clause contains a differnt set of criteria.

Hope this is clear.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [April 14, 2009, 3:31pm UTC](https://forum.inductiveautomation.com/t/expression-jython/1084/2 "2009-04-14T15:31:32Z")

</div>

There are various ways to achieve this. You could use the runScript() expression which bridges the two languages, or you could use the {[System]Client/User/RolesDataSet} tag directly.
