# Expression Binding in perspective with Params passing

**URL:** <https://forum.inductiveautomation.com/t/expression-binding-in-perspective-with-params-passing/30643>\
**Category:** Ignition\
**Created:** [December 12, 2019, 1:48am UTC](https://forum.inductiveautomation.com/t/expression-binding-in-perspective-with-params-passing/30643 "2019-12-12T01:48:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Loizel87](https://avatars.discourse-cdn.com/v4/letter/l/91b2a8/32.png) [@Loizel87](https://forum.inductiveautomation.com/u/Loizel87)\
**Post date:** [December 12, 2019, 1:48am UTC](https://forum.inductiveautomation.com/t/expression-binding-in-perspective-with-params-passing/30643/1 "2019-12-12T01:48:14Z")

</div>

I am currently having issues with syntax of an expression binding to perform a runScript function.

The expression code below works and is consistent on executing the script

_runScript(“WriteAccess.canWrite”,0,’[default]Develop\_DI/Cfg\_Tag’,{session.props.auth.user.roles})_

I want to replace the Develop\_DI/Cfg\_Tag portion with a PARAMS for the view. the PARAMS is called myTag. The current value in my example is Develop\_DI/Cfg\_Tag

if I build the expression as follows, I get a comm overlay and the script fails to execute:

_runScript(“WriteAccess.canWrite”,0,’[default]’+ {view.params.myTag}),{session.props.auth.user.roles})_

or

_runScript(“WriteAccess.canWrite”,0, {view.params.myTag}),{session.props.auth.user.roles})_

Thanks,

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [December 12, 2019, 3:56pm UTC](https://forum.inductiveautomation.com/t/expression-binding-in-perspective-with-params-passing/30643/2 "2019-12-12T15:56:44Z")

</div>

It looks like you have too many closing parentheses… try

```auto
runScript("WriteAccess.canWrite", 0, {view.params.myTag}, {session.props.auth.user.roles})

```

---

<div class="post-metadata">

**Author:** ![Loizel87](https://avatars.discourse-cdn.com/v4/letter/l/91b2a8/32.png) [@Loizel87](https://forum.inductiveautomation.com/u/Loizel87)\
**Post date:** [December 12, 2019, 5:47pm UTC](https://forum.inductiveautomation.com/t/expression-binding-in-perspective-with-params-passing/30643/3 "2019-12-12T17:47:39Z")

</div>

Thanks for the suggestion, I tried executing the code as per below and still fails.

```auto
runScript("WriteAccess.canWrite",0,{view.params.myTag},{session.props.auth.user.roles})

```

when I only change the view.params.myTag to hard text will it function as required.

Regards,

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [December 12, 2019, 6:48pm UTC](https://forum.inductiveautomation.com/t/expression-binding-in-perspective-with-params-passing/30643/4 "2019-12-12T18:48:51Z")

</div>

What is the error you are seeing? This would realy help me narrow down what is happening for you.

With a Script Project Library set up as “Project Library/project/Repl”, and a configured Script set up as

```auto
def return_value(value):
    return value

```

and a property set up as  
 ![26%20AM](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/80a36eb7b20ca12d83facc3864e9743f7bb8ae4a.png)  
and an Expression binding configured as

```auto
runScript("project.Repl.return_value",0,{this.custom.tag})

```

my binding/expression return is:

 ![33%20AM](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/8c7d6b246b77d6ae4db418c3ee8c371e72a4cef9.png)
