Iterate in an Expression Tag

I have a list of strings in one tag and basically in a separate expression tag I want to iterate through that list and see if any of the strings are equal to a specific value, If one item is set the tag to true. I don’t see any way to iterate in expression and using a script is impractical because it would need to be a global script and this does not translate well from project to project.

What is the datatype of your list? (Show an example.)

Without seeing your data, it’s difficult to be certain, but here’s an example that may help.

len(lookup(split({[~]List-O-Strings}, ','), {[~]Lookup Value}, '', 0, 0))

So I am using an expression tag to run “runScript(‘system.dataset.filterColumns(system.util.getSessionInfo(), [1])’)”, This will return a list of active users on the gateway. Now I want to have a seperate tag ‘hasAdministratorRole’ that will be true if any of the active users have the administrator role. This requires me to iterate through a list of users until I find one that has the role or I reach the end. I can’t do it all in scripting because the scripting function to check role requires authentication, which I don’t want as I would need to change my script anytime we add new users or change passwords

Are you sure? Running from the script console, yes, but I doubt it from gateway scope. has parameters for username and password and they are not marked as optional in the manual. Is there another way I am not seeing?

Hmm. You’re right. You’ll probably have to use a runScript() binding in each project’s session auth property to pass the information to a scripted cache.