# Passing parameters to crane

**URL:** <https://forum.inductiveautomation.com/t/passing-parameters-to-crane/100345>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [December 31, 2024, 6:22pm UTC](https://forum.inductiveautomation.com/t/passing-parameters-to-crane/100345 "2024-12-31T18:22:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahawes](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ahawes/32/36337_2.png) [@ahawes](https://forum.inductiveautomation.com/u/ahawes)\
**Post date:** [December 31, 2024, 6:22pm UTC](https://forum.inductiveautomation.com/t/passing-parameters-to-crane/100345/1 "2024-12-31T18:22:10Z")

</div>

Good afternoon Team,

I am having issues passing a new parameter I created and would like some help.

I have created template that I want to pass the crane\_command from each crane.

I have 3 cranes. the CraneNumber passes but I cannot get tthe crane\_command to pass like i want it to.

The idea, is that the 'Pallet Label' would have the view hidden until a pallet is on the crane.

I use the when looking into the view, the template is bound to a simple query that when a pallet is there is shows. It does not follow the view where if the lpn on that line is bigger than 0. If i go in and click each crane i can see it but not the "hidden" pallet label.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/f/1f444fe9552b41d6395d01e8e7a35f714ef9f4dc.png)

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

```python
{this.props.params.crane_command} > 0

```

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/6/d6ed4894219cc66d48ecab0bda08947bfb4b42ac.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/2/d2b5c21190ba406f4c49b9c3a24f87b2a1ca7a22.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 31, 2024, 6:42pm UTC](https://forum.inductiveautomation.com/t/passing-parameters-to-crane/100345/2 "2024-12-31T18:42:40Z")

</div>

![Label params binding](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/a/6a0017a3831cfe2a280a8346cb4e103466095e40.png)

If I understand the problem correctly, you have bound the label's visibility to the label's `props.params.crane_command` which doesn't exist. (And there is no `params` section in the properties of the label shown above.)

Try changing the expression to,  
`{view.params.crane_command} > 0`

---

<div class="post-metadata">

**Author:** ![ahawes](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ahawes/32/36337_2.png) [@ahawes](https://forum.inductiveautomation.com/u/ahawes)\
**Post date:** [January 2, 2025, 12:48pm UTC](https://forum.inductiveautomation.com/t/passing-parameters-to-crane/100345/3 "2025-01-02T12:48:54Z")

</div>

Thnk you for always helping out Transitor!!!

Ok, so I changed that but still does not work.

I have changed the template on the 'Crane Overview' to this below.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/7/672e6612ce7ffaadbb9ab1ee6374dcd8a9e52682.png)

Once i drop my template in, i populate the crane number, 1-3, and then bind the crane\_command to a query for the LPN.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/9/79dd094223c76df14c1ca0e96c3ac85b5bbbb54b.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 2, 2025, 1:51pm UTC](https://forum.inductiveautomation.com/t/passing-parameters-to-crane/100345/4 "2025-01-02T13:51:42Z")

</div>

Add a label to the embedded view, add an expression binding and set it to,

```python
if(
	isNull({view.params.crane_command}),
	"null!",
	{view.params.crane_command}
)

```

This will let you see if you've got the parameter coming into the view at all!

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [January 2, 2025, 1:53pm UTC](https://forum.inductiveautomation.com/t/passing-parameters-to-crane/100345/5 "2025-01-02T13:53:42Z")

</div>

It looks like your query is sometimes returning data you aren't expecting. It's polling every 5 seconds so you should be able to monitor the results you're getting back from Ignition designer.

For troubleshooting, try making an expression binding that just shows the query result and then put an expression transform on that to make it do the logic you're actually planning to use.

This will allow you to break out your logic into sections and see what's happening.

I suspect your issue is either that your query is returning something you aren't expecting or it is not triggering the binding as often as you expect.

---

<div class="post-metadata">

**Author:** ![ahawes](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ahawes/32/36337_2.png) [@ahawes](https://forum.inductiveautomation.com/u/ahawes)\
**Post date:** [January 2, 2025, 3:38pm UTC](https://forum.inductiveautomation.com/t/passing-parameters-to-crane/100345/6 "2025-01-02T15:38:50Z")

</div>

Ok, here is a pic of the label.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/9/39f50e2b28ae6ec38dec28be786e7c172ad6900c.png)

---

<div class="post-metadata">

**Author:** ![ahawes](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ahawes/32/36337_2.png) [@ahawes](https://forum.inductiveautomation.com/u/ahawes)\
**Post date:** [January 2, 2025, 4:13pm UTC](https://forum.inductiveautomation.com/t/passing-parameters-to-crane/100345/7 "2025-01-02T16:13:44Z")

</div>

Good morning,

The pallet label in the template is used to represent the pallet on the crane. It changes each put or pick. I think it is working fine and it will show the correct pallet number.

My issues is getting that pallet, from the template, to show on the crane once a number/pallet is present.
