# How to pass parameters using system.perspective.navagate

**URL:** <https://forum.inductiveautomation.com/t/how-to-pass-parameters-using-system-perspective-navagate/52852>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 8, 2021, 11:10pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-parameters-using-system-perspective-navagate/52852 "2021-11-08T23:10:47Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![israel.jordan](https://avatars.discourse-cdn.com/v4/letter/i/ce73a5/32.png) [@israel.jordan](https://forum.inductiveautomation.com/u/israel.jordan)\
**Post date:** [November 8, 2021, 11:10pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-parameters-using-system-perspective-navagate/52852/1 "2021-11-08T23:10:47Z")

</div>

Hello All,

I am trying to edit the data on Table Component. I came across a great [video](https://inductiveuniversity.com/videos/edit-data-in-database/7.7) that give a basic example of how to do so but I am having a bit of a problem passing the parameter to the new view. In my example, I am selecting a column and I have a button that starts the navigation. Like in the video, I have a custom property attached to my table. But I am using an OnSelectionChange event to update its value. With my button, the navigation works fine. I am navigating like this: ` system.perspective.navigate(view = "Objects/Next View", payload={'key':str(self.parent.getChild("FlexContainer").getChild("table").custom.myCustParam)})`  
The Custom Parameter on the view being navigated to has the same name and case as the Custom Parameter on the table but it does not update when the view is navigated to. Can anyone help me to figure out why the parameter is not updating?

Thank you in advance,

Israel

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [November 8, 2021, 11:17pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-parameters-using-system-perspective-navagate/52852/2 "2021-11-08T23:17:06Z")

</div>

Check out message handlers, I think that is how you need to pass your parameters.  
[https://docs.inductiveautomation.com/display/DOC81/Component+Message+Handlers](https://docs.inductiveautomation.com/display/DOC81/Component+Message+Handlers)

---

<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:** [November 9, 2021, 2:53am UTC](https://forum.inductiveautomation.com/t/how-to-pass-parameters-using-system-perspective-navagate/52852/3 "2021-11-09T02:53:52Z")

</div>

The [documentation](https://docs.inductiveautomation.com/display/DOC81/system.perspective.navigate) for the navigate function does not list a `payload` kwarg - I think you might want to use `params` instead. Also, you’re sending your parameter to a property named `key` in your current code. I’ve modified your code to pass the expected param.

```auto
system.perspective.navigate(view="Objects/Next View", params={'myCustParam':str(self.parent.getChild("FlexContainer").getChild("table").custom.myCustParam)})

```

---

<div class="post-metadata">

**Author:** ![israel.jordan](https://avatars.discourse-cdn.com/v4/letter/i/ce73a5/32.png) [@israel.jordan](https://forum.inductiveautomation.com/u/israel.jordan)\
**Post date:** [November 9, 2021, 4:18pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-parameters-using-system-perspective-navagate/52852/4 "2021-11-09T16:18:23Z")

</div>

Thank you for your reply @cmallonee. I have applied the changes you have suggested but I am still unable to use the value in the view being navigated to. In the root of that view, I have my custom parameter “myCustParam” and I have another custom parameter which is a dataset that should be using the “myCustParam” parameter in it’s where clause. I am trying to figure out why the parameter never changes or why it not being passed. Do you have any other suggestions that I might be able to try?

---

<div class="post-metadata">

**Author:** ![israel.jordan](https://avatars.discourse-cdn.com/v4/letter/i/ce73a5/32.png) [@israel.jordan](https://forum.inductiveautomation.com/u/israel.jordan)\
**Post date:** [November 9, 2021, 4:46pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-parameters-using-system-perspective-navagate/52852/5 "2021-11-09T16:46:08Z")

</div>

Thanks for your quick reply @josborn. When writing this post, I failed to mention that I have actually tried passing a message to the new view in the onSelectionChange event. The problem that I had with that is the view is not open at the time the message was sent. I have log statements that print when the MessageHandler receives the message. But I cannot get any of the log statements to print unless I am using the preview mode in the Designer and the view being navigated to is already open. I have also tried to use the navigate function and immediately use the sendMessage function to send a message to the view being navigated to but that doesn’t seem to work either. The example that I mentioned in my post was not for perspective. Should I be going about this in a different way since I am using Perspective?

---

<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:** [November 9, 2021, 4:50pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-parameters-using-system-perspective-navagate/52852/6 "2021-11-09T16:50:36Z")

</div>

> [@israel.jordan](#):
>
> In the root of that view, I have my custom parameter “myCustParam”

It's hard to tell if this is a terminology concern or not, but "root" nodes do NOT have params - only View nodes do. If you do not have `params.MyCustParam`, then none of this is going to work.

Please provide the code as you have it currently, as well as a screenshot of the params of the View in question.

I just attempted this myself in 8.1.12rc1 and it works exactly like I would expect, so there is either a configuration issue with the View in use, or your code. If you could supply the view.json file of the View you are attempting to navigate to I could examine it and provide the exact code you need to use.

---

<div class="post-metadata">

**Author:** ![israel.jordan](https://avatars.discourse-cdn.com/v4/letter/i/ce73a5/32.png) [@israel.jordan](https://forum.inductiveautomation.com/u/israel.jordan)\
**Post date:** [November 9, 2021, 7:12pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-parameters-using-system-perspective-navagate/52852/7 "2021-11-09T19:12:25Z")

</div>

Thank you for your response. Sorry for the confusion. I am using views. The “root” that I referred to is the root container (In the Project Browser tree, it is the element directly under the View name).  
This is a screenshot of the custom parameter that is on the Table.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/d/2d98e4771cb59e53789eaa4a72d6c815e5208c03.png)

I am setting the parameter in the onSelectionChange like this:

```auto
self.custom.myCustParam = 11

```

In my button, I have an onActionPerformed event that sends does the navigation like this:

```auto
system.perspective.navigate(view = "Objects/New View",params = {'myCustParam':str(self.parent.getChild("FlexContainer").getChild("Table").custom.myCustParam)})

```

This is a screenshot of the view that is being navigated to:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/e/6e6eb4c1ba2c9e96217f1283b6c194fb5cf91bec.png)

---

<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:** [November 9, 2021, 7:26pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-parameters-using-system-perspective-navagate/52852/8 "2021-11-09T19:26:07Z")

</div>

That’s not how you receive params for the View. The named View node must have the param set within the `params` category or properties. You should then update any bindings against `self.root.custom.myCustParam` to `self.view.params.myCustParam`.  
 ![Screen Shot 2021-11-09 at 11.24.45 AM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/4/042f0b1b4caa65a43fc3c2e40db590345d6f05be.png)

Please review the [documentation](https://docs.inductiveautomation.com/display/DOC81/Views+in+Perspective).

---

<div class="post-metadata">

**Author:** ![israel.jordan](https://avatars.discourse-cdn.com/v4/letter/i/ce73a5/32.png) [@israel.jordan](https://forum.inductiveautomation.com/u/israel.jordan)\
**Post date:** [November 9, 2021, 7:43pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-parameters-using-system-perspective-navagate/52852/9 "2021-11-09T19:43:07Z")

</div>

That worked! Thank you so much for your help!
