# How do you refer to parameters with hyphens in their names?

**URL:** <https://forum.inductiveautomation.com/t/how-do-you-refer-to-parameters-with-hyphens-in-their-names/44554>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [March 16, 2021, 10:06pm UTC](https://forum.inductiveautomation.com/t/how-do-you-refer-to-parameters-with-hyphens-in-their-names/44554 "2021-03-16T22:06:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://forum.inductiveautomation.com/u/peter)\
**Post date:** [March 16, 2021, 10:06pm UTC](https://forum.inductiveautomation.com/t/how-do-you-refer-to-parameters-with-hyphens-in-their-names/44554/1 "2021-03-16T22:06:44Z")

</div>

I created a custom parameter on a Perspective view object called "selected-panel", filled in a default value and then for testing I bound a label to the value of the parameter et voila I can see the value on my browser window.

Next I went to create a message handler on that view object so that I can update the value of that parameter from other locations. In the onMessageReceived() handler I typed in:

`self.view.custom.selected-panel = payload`

Which gets a red squiggly line under all of it, and the tool tip says:

> can't assign to operator

It took me a while to figure out that the hyphen was not being interpreted as a hyphen, but probably as a minus sign, which totally changes the interpretation of that line of code.

In this case I can easily remove the hyphen from the name, but what would be the proper way to accommodate names with hyphens in them?

Or is the advice simply "Don't do that!"

* * *

Ignition 8.1.3 on Ubuntu

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 16, 2021, 10:08pm UTC](https://forum.inductiveautomation.com/t/how-do-you-refer-to-parameters-with-hyphens-in-their-names/44554/2 "2021-03-16T22:08:57Z")

</div>

```auto
self.view.custom['selected-panel'] = payload

```

or if that doesn’t work maybe don’t do that 😉
