# Dropdown Value - Update Error (Parameterized Perspective Popup)

**URL:** <https://forum.inductiveautomation.com/t/dropdown-value-update-error-parameterized-perspective-popup/90062>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 7, 2024, 7:56pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-update-error-parameterized-perspective-popup/90062 "2024-05-07T19:56:34Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brad\_Medley](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@Brad\_Medley](https://forum.inductiveautomation.com/u/Brad_Medley)\
**Post date:** [May 7, 2024, 7:56pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-update-error-parameterized-perspective-popup/90062/1 "2024-05-07T19:56:34Z")

</div>

I'm creating a popup that will be passing parameters based on selected row in a table. Labels receive the information fine, but my dropdown value is not updating to the correct value that is coming into the popup.

Log View:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/7/173cd0d91ae009713cbe5e275f9866b8daee08b6.png)

Table:

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

Main View Params:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/f/7fd931f9d7ac73e0b49d818683f5bb33342d321b.png)

Popup Params:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/f/cf78e6d657bee6db4470ce116143810320d5d7b5.png)

Dropdown Binding:

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

Example:

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

I'm sure this is an easy fix just not sure what I am doing wrong here.

---

<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:** [May 7, 2024, 8:24pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-update-error-parameterized-perspective-popup/90062/2 "2024-05-07T20:24:35Z")

</div>

What's your script look like that launches the popup?

Maybe you have a case sensitive error or are not passing the parameter to the popup.

---

<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:** [May 7, 2024, 8:31pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-update-error-parameterized-perspective-popup/90062/3 "2024-05-07T20:31:21Z")

</div>

Just as a test I made a Popup with a dropdown on it.

The popup takes a parameter called "Param" which I set a default value of 0.  
The dropdown has 2 entries. value 0 is "Test" and value 1 is "test23".  
I bound the popup's value property to "Param"

I added a button to a screen that runs this script  
system.perspective.openPopup('x', 'Popups/temp', {"Param":1})

It correctly changed the description in the dropdown to "test23".

I suspect you're either passing in the label instead of the value or you have a case sensitivity issue on your parameter name.

Hope that helps.

---

<div class="post-metadata">

**Author:** ![Bushmatic](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bushmatic/32/87014_2.png) [@Bushmatic](https://forum.inductiveautomation.com/u/Bushmatic)\
**Post date:** [May 7, 2024, 8:31pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-update-error-parameterized-perspective-popup/90062/4 "2024-05-07T20:31:37Z")

</div>

Could be wrong but you may want to bind to 'options' instead of (or in addition to) 'value' on your dropdown. This would require reconfiguring your parameter-passing logic a bit. I have confirmed that leaving an empty array in the 'options' property does not let me set a value.

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

---

<div class="post-metadata">

**Author:** ![Brad\_Medley](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@Brad\_Medley](https://forum.inductiveautomation.com/u/Brad_Medley)\
**Post date:** [May 7, 2024, 8:50pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-update-error-parameterized-perspective-popup/90062/5 "2024-05-07T20:50:05Z")

</div>

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

---

<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:** [May 8, 2024, 12:01pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-update-error-parameterized-perspective-popup/90062/6 "2024-05-08T12:01:13Z")

</div>

I'd set up a logger with that script and make sure the value you expect to be going into "machine" is the value you're sending. Also, make sure that value is the key for the drop down; not the description.

The options section will have a list of all the values and their descriptions.

It looks like you're passing into the parameter that matches your binding so presumably it is not getting the value you expect to be sending. You could also copy/paste your open popup script and send a hardcoded value to confirm that is working. I believe it is but it's always good to test.

Edit:  
Another possibility is that you have more than one version of your popup if you've been working on multiple iterations. Note that you're calling "Popups/RawMaterialForm"

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [May 8, 2024, 12:32pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-update-error-parameterized-perspective-popup/90062/7 "2024-05-08T12:32:16Z")

</div>

could you give us a json copy of the dropwdown? so we can inspect the bindings

(something that looks like this, but ofc a dropdown and not a markdown, just select the component and copy paste it here, **formated** )

```python
[
  {
    "type": "ia.display.markdown",
    "version": 0,
    "props": {
      "markdown": {
        "escapeHtml": false
      }
    },
    "meta": {
      "name": "Markdown"
    },
    "position": {
      "x": 288,
      "y": 373,
      "height": 200,
      "width": 200
    },
    "custom": {},
    "propConfig": {
      "props.source": {
        "binding": {
          "type": "expr",
          "config": {
            "expression": "{../TextField.props.text}"
          },
          "transforms": [
            {
              "code": "...",
              "type": "script"
            }
          ]
        }
      }
    }
  }
]

```

---

<div class="post-metadata">

**Author:** ![Brad\_Medley](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@Brad\_Medley](https://forum.inductiveautomation.com/u/Brad_Medley)\
**Post date:** [May 8, 2024, 8:37pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-update-error-parameterized-perspective-popup/90062/8 "2024-05-08T20:37:05Z")

</div>

Dropdown:

```python
[
  {
    "type": "ia.input.dropdown",
    "version": 0,
    "props": {
      "options": [
        {
          "label": "Line 11",
          "value": "L11"
        },
        {
          "label": "Line 12",
          "value": "L12"
        },
        {
          "label": "Line 21",
          "value": "L21"
        },
        {
          "label": "Line 22",
          "value": "L22"
        },
        {
          "label": "Line 31",
          "value": "L31"
        },
        {
          "label": "Line 41",
          "value": "L41"
        },
        {
          "label": "Line 51",
          "value": "L51"
        },
        {
          "label": "Line 52",
          "value": "L52"
        },
        {
          "label": "Line 61",
          "value": "L61"
        },
        {
          "label": "Line 62",
          "value": "L62"
        }
      ]
    },
    "meta": {
      "name": "Dropdown"
    },
    "position": {
      "x": 214,
      "y": 87,
      "height": 36,
      "width": 256
    },
    "custom": {},
    "propConfig": {
      "custom.machine": {
        "binding": {
          "config": {
            "expression": "if({view.params.action}=\"add\",\"\",{view.params.machine})"
          },
          "type": "expr"
        }
      },
      "props.value": {
        "binding": {
          "config": {
            "path": "view.params.machine"
          },
          "type": "property"
        }
      }
    },
    "events": {
      "system": {
        "onStartup": {
          "config": {
            "script": "\tself.refreshBinding('self.props.value')"
          },
          "scope": "G",
          "type": "script"
        }
      }
    },
    "scripts": {
      "customMethods": [],
      "extensionFunctions": null,
      "messageHandlers": [
        {
          "messageType": "refreshPopup",
          "pageScope": true,
          "script": "\tself.refreshBinding(\"self.props.value\")",
          "sessionScope": true,
          "viewScope": true
        }
      ]
    }
  }
]

```

Label (Label Works):

```python
[
  {
    "type": "ia.display.label",
    "version": 0,
    "props": {},
    "meta": {
      "name": "Label_0"
    },
    "position": {
      "x": 599,
      "y": 158,
      "height": 32,
      "width": 50
    },
    "custom": {},
    "propConfig": {
      "props.text": {
        "binding": {
          "config": {
            "path": "view.params.machine"
          },
          "type": "property"
        }
      }
    }
  }
]

```

---

<div class="post-metadata">

**Author:** ![Brad\_Medley](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@Brad\_Medley](https://forum.inductiveautomation.com/u/Brad_Medley)\
**Post date:** [May 8, 2024, 8:50pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-update-error-parameterized-perspective-popup/90062/9 "2024-05-08T20:50:43Z")

</div>

I set up labels on the page and the params come through and show up in the labels. It does match the value in the options also. Check out my example it shows the labels receiving the correct information, just for some reason the dropdown does not receive it.

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

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

Label Property Binding:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/e/3e98983f9246223778d96d575fed834643de4ae3.png)

Dropdown Property Binding:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/c/1c06d7a6745500e3c4e02b2916d24cf4cef244d7.png)

I double checked on the version and it is the correct version.

---

<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:** [May 9, 2024, 11:58am UTC](https://forum.inductiveautomation.com/t/dropdown-value-update-error-parameterized-perspective-popup/90062/10 "2024-05-09T11:58:35Z")

</div>

For a test, try binding the value of your dropdown to the value of the label. You can see the value coming in the label but that would confirm the value is matching a value on the dropdown list. Basically making sure there aren't spaces, etc.

I usually troubleshoot this kind of problem with a logger.

> **[system.util.getLogger | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-util/system-util-getLogger)**
>
> Returns a Logger object that can be used to log messages to the console.

---

<div class="post-metadata">

**Author:** ![Brad\_Medley](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@Brad\_Medley](https://forum.inductiveautomation.com/u/Brad_Medley)\
**Post date:** [May 9, 2024, 3:56pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-update-error-parameterized-perspective-popup/90062/11 "2024-05-09T15:56:46Z")

</div>

Okay, so the value is there it is just not displaying.  
I added a button to send the information to a logger for me to test it out. It doesn't seem like I have any extra spaces. Also, it seems to be matching the value in the options section.

Button Added:

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

Button Script:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/4/348b43ba7ecfad8dc7f90ad9d8a4400ea9087851.png)

Logger Info:

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

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

---

<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:** [May 9, 2024, 6:05pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-update-error-parameterized-perspective-popup/90062/12 "2024-05-09T18:05:56Z")

</div>

I normally use integers (ID) for the value. I wonder if it's something with string matching.

It's weird because I made an example on my end and it was behaving like we both suspect.

If you call support you can do a client share session and they can help you troubleshoot it.

---

<div class="post-metadata">

**Author:** ![Brad\_Medley](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@Brad\_Medley](https://forum.inductiveautomation.com/u/Brad_Medley)\
**Post date:** [May 10, 2024, 8:36pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-update-error-parameterized-perspective-popup/90062/13 "2024-05-10T20:36:25Z")

</div>

> [@Steve\_Laubach](#):
>
> s (ID) for the value. I wonder if it's something with string matching.
> 
> It's weird because I made an example on my end and it was behaving like we both suspect.
> 
> If you call support you can do a client share session

I think it is a data type issue. If I put the value like this "L22" it actually puts the value into the dropdown value section with this. code.

Works this route

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

Variable Method (Does not work):

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/c/ac4fb8a35a4ddaa73c274a736e629d5b9e359b74.png)

Datatypes:

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

I did try putting str around the variable, but that still did not work. Is there another method to convert unicode to a string for this?

---

<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:** [May 13, 2024, 12:11pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-update-error-parameterized-perspective-popup/90062/14 "2024-05-13T12:11:41Z")

</div>

When I did my test example before initially responding to you I just had a binding on the dropdown that was pointed to the parameter. I passed in a string and the binding took care of the rest. You would have to add a script transform to do any logging in that method (I didn't log anything when I did my test because it worked)

It kind of looks like the message handler is handling it differently than a binding to the parameter. If you're embedding the view you might need to use the message handler but if you're just doing a popup you should be able to send it as a parameter.

When I get a weird behavior like this I usually just call support.

---

<div class="post-metadata">

**Author:** ![Brad\_Medley](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@Brad\_Medley](https://forum.inductiveautomation.com/u/Brad_Medley)\
**Post date:** [May 13, 2024, 6:25pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-update-error-parameterized-perspective-popup/90062/15 "2024-05-13T18:25:18Z")

</div>

I just want to say I tried the Int function in scripting and it did not work, but that is probably my issue. I did follow this forum and tried in the expression to convert it to an Int and it did work.

[Binding to dropdown to page parameter not working - Ignition - Inductive Automation Forum](https://forum.inductiveautomation.com/t/binding-to-dropdown-to-page-parameter-not-working/69802)
