# How to insert comma separated string as arguments in expression function

**URL:** <https://forum.inductiveautomation.com/t/how-to-insert-comma-separated-string-as-arguments-in-expression-function/60588>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [June 9, 2022, 11:08pm UTC](https://forum.inductiveautomation.com/t/how-to-insert-comma-separated-string-as-arguments-in-expression-function/60588 "2022-06-09T23:08:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [June 9, 2022, 11:08pm UTC](https://forum.inductiveautomation.com/t/how-to-insert-comma-separated-string-as-arguments-in-expression-function/60588/1 "2022-06-09T23:08:25Z")

</div>

We have a view parameter `roles` which which we’d like to fill in with a comma separated list of roles like `Authenticated/Roles/Role1, Authenticated/Roles/Role2`. The roles and number of roles vary. We can check this parameter with a script transform on a binding to parameter like the code below, enabling a component if the user has any of the roles listed (this version doesn’t use the `Authenticated/Roles` prefix on each role):

```auto
return any(role.strip() in value for role in self.view.params.roles.split(','))

```

Is there a way we can do this as an expression binding like the one following (which does _not_ work if there’s more than one role listed in the `roles` parameter)?

```auto
isAuthorized(False, {view.params.roles})
	&& len({view.params.roles}) > 0 // Prevent authorization with empty roles parameter.

```

What we’re aiming for is a way to fill in a varying number of arguments as surrounded by stars below in the expression from a single string parameter:

```auto
isAuthorized(False, **role1, role2, roleN** )

```

I feel like I must be missing something simple…

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 10, 2022, 3:35pm UTC](https://forum.inductiveautomation.com/t/how-to-insert-comma-separated-string-as-arguments-in-expression-function/60588/2 "2022-06-10T15:35:48Z")

</div>

There’s no way to ‘spread’ arguments into an expression call, no. I think you’d have to use `runScript` here.
