# Changing a parameter on a view through a project script

**URL:** <https://forum.inductiveautomation.com/t/changing-a-parameter-on-a-view-through-a-project-script/43797>\
**Category:** Ignition\
**Created:** [February 24, 2021, 5:42pm UTC](https://forum.inductiveautomation.com/t/changing-a-parameter-on-a-view-through-a-project-script/43797 "2021-02-24T17:42:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![michael.black](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@michael.black](https://forum.inductiveautomation.com/u/michael.black)\
**Post date:** [February 24, 2021, 5:42pm UTC](https://forum.inductiveautomation.com/t/changing-a-parameter-on-a-view-through-a-project-script/43797/1 "2021-02-24T17:42:45Z")

</div>

I am trying to change the value of a parameter (false/true) from a project script. Lets say I have a View called View. That view has a parameter on the view called Visibility. I have a button which runs a script on that view. I want the script to change the value of the parameter on the view. I have tried to create this and no matter what I try I am unable to get the value to change on the view itself. Can an example of how to do this be supplied? Thanks.

---

<div class="post-metadata">

**Author:** ![tony.petruzzi1](https://avatars.discourse-cdn.com/v4/letter/t/3d9bf3/32.png) [@tony.petruzzi1](https://forum.inductiveautomation.com/u/tony.petruzzi1)\
**Post date:** [April 8, 2021, 9:36pm UTC](https://forum.inductiveautomation.com/t/changing-a-parameter-on-a-view-through-a-project-script/43797/2 "2021-04-08T21:36:13Z")

</div>

I think you have to do this using messages:  
[https://docs.inductiveautomation.com/display/DOC81/system.util.sendMessage](https://docs.inductiveautomation.com/display/DOC81/system.util.sendMessage)

---

<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:** [April 8, 2021, 10:08pm UTC](https://forum.inductiveautomation.com/t/changing-a-parameter-on-a-view-through-a-project-script/43797/3 "2021-04-08T22:08:02Z")

</div>

onActionPerformed script of a Button which is a child component of “View”:

```auto
self.view.params.Visibility = False

```

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [April 9, 2021, 3:51am UTC](https://forum.inductiveautomation.com/t/changing-a-parameter-on-a-view-through-a-project-script/43797/4 "2021-04-09T03:51:05Z")

</div>

To add to Cody’s answer, you can use this button to ‘pick’ a component property from a list to make this easier:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/e/8ed276b481481807edb3b413a9924d8942ba4614.png)
