# A dropdown shows 'Select...', but the value does not change to 'Select...'

**URL:** <https://forum.inductiveautomation.com/t/a-dropdown-shows-select-but-the-value-does-not-change-to-select/74221>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 26, 2023, 2:31pm UTC](https://forum.inductiveautomation.com/t/a-dropdown-shows-select-but-the-value-does-not-change-to-select/74221 "2023-05-26T14:31:09Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [May 26, 2023, 2:31pm UTC](https://forum.inductiveautomation.com/t/a-dropdown-shows-select-but-the-value-does-not-change-to-select/74221/1 "2023-05-26T14:31:09Z")

</div>

I am a bit perplexed.

What I have:  
One dropdown from a query as line  
One dropdown from a query using the line dropdown as a parameter called sort  
One label from a query using line and sort

Issue:  
A dropdown shows 'Select...', but the value does not change to 'Select...'  
So my label bound to the value doesn't change.

Making the issue occur:  
Step1 I set the line  
Step2 I set the sort  
Step3 I set the line again  
Sort dropdown displays 'Select...' as it is supposed to, but the value remains the last selected value.  
The label does not change at all because it looks at the value that was last in sort.

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [May 26, 2023, 2:36pm UTC](https://forum.inductiveautomation.com/t/a-dropdown-shows-select-but-the-value-does-not-change-to-select/74221/2 "2023-05-26T14:36:43Z")

</div>

I don't know what is going on with my Ignition.  
I have version 8.1.19 and suddenly a bunch of polling was turned on for a bunch of queries.  
I did not do this.  
All are set polling 1 second.

I am pretty sure someone must have got on my pc and set that, and it really really ticks me off.  
I can't imagine there is a bug that turns on polling and changes the default 30 seconds to 1 second.

I need a way to force the update when I change the line and the sort, and not turn on polling.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [May 26, 2023, 2:55pm UTC](https://forum.inductiveautomation.com/t/a-dropdown-shows-select-but-the-value-does-not-change-to-select/74221/3 "2023-05-26T14:55:16Z")

</div>

The sort dropdown `value` has no reason to change when you change `line`'s value. It only changes `sort`'s options.  
I'd do it one of 2 ways:

- if you use a binding and a script transform to set up sort's options, I'd add a line in the transform to set the value to null or `''`
- add an on change script to sort's `options`, and reset `value` from here.

---

<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:** [May 26, 2023, 2:56pm UTC](https://forum.inductiveautomation.com/t/a-dropdown-shows-select-but-the-value-does-not-change-to-select/74221/4 "2023-05-26T14:56:45Z")

</div>

You should use an Expression Structure binding for the `options` property of the third dropdown. There should be two Object Members of the Expression Structure: `line` and `sort`.

Place a transform script for the binding, and within the script use the line and sort attributes of value to parameterize the Named Query, BUT ONLY WHEN both line and sort have values which make sense.

```auto
if value.line != '' and value.sort != '':
    # return named query
else:
    return ''

```

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [May 26, 2023, 3:01pm UTC](https://forum.inductiveautomation.com/t/a-dropdown-shows-select-but-the-value-does-not-change-to-select/74221/5 "2023-05-26T15:01:53Z")

</div>

There are only 2 dropdowns, the 3rd component is a label.

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [May 26, 2023, 3:11pm UTC](https://forum.inductiveautomation.com/t/a-dropdown-shows-select-but-the-value-does-not-change-to-select/74221/6 "2023-05-26T15:11:18Z")

</div>

> [@pascal.fragnoud](#):
>
> add an on change script to sort's `options`, and reset `value` from here.

I did this.  
However, I know I set a change script on Dropdown\_line's value property.

There doesn't seem to be an indicator on the property editor that value has a change script.  
The project browser indicates there is change script, but not where in the component.  
Value is the most likely spot to check, but I am checking for a way that is easily traced.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/7/57712e41ea1bb485a0ef028a1434c4e90a940253.png)  
This solution works, but I need a way to do the change that is easy to track.

> [@cmallonee](#):
>
> You should use an Expression Structure

I like the idea of using an expression binding as a solution.  
The issue is that I don't know how to target what is being shown on my sort dropdown because what is being shown is not what is in the value property.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [May 26, 2023, 3:20pm UTC](https://forum.inductiveautomation.com/t/a-dropdown-shows-select-but-the-value-does-not-change-to-select/74221/7 "2023-05-26T15:20:01Z")

</div>

> [@zacharyw.larson](#):
>
> There doesn't seem to be an indicator on the property editor that value has a change script.

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

> [@zacharyw.larson](#):
>
> Value is the most likely spot to check, but I am checking for a way that is easily traced.

I think `options` is the better/most obvious place for this. You want `value` to reset when the options change. So put the script on options.

> [@zacharyw.larson](#):
>
> I like the idea of using an expression binding as a solution.

I don't think that would work. A structure binding makes sure your property depends on several others.  
But it will still not change `value`.

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [May 26, 2023, 3:24pm UTC](https://forum.inductiveautomation.com/t/a-dropdown-shows-select-but-the-value-does-not-change-to-select/74221/8 "2023-05-26T15:24:39Z")

</div>

Thanks x2

I didn't see that symbol, thanks!  
Setting the change script on the Sort dropdown's options keeps component's scripts with the component.  
This is very clean.

Thanks

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [May 26, 2023, 3:33pm UTC](https://forum.inductiveautomation.com/t/a-dropdown-shows-select-but-the-value-does-not-change-to-select/74221/9 "2023-05-26T15:33:12Z")

</div>

My initial question is solved.

The query polls getting turned on and set for 1 second is still a mystery.

Every query on the page was set to polling and 1second except the query for the Line dropdown.  
I don't know how to troubleshoot that, and I still think someone at my site remoted to my computer to mess with me and just hasn't owned up to it yet. Hard to imagine a bug doing it.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [May 26, 2023, 3:39pm UTC](https://forum.inductiveautomation.com/t/a-dropdown-shows-select-but-the-value-does-not-change-to-select/74221/10 "2023-05-26T15:39:19Z")

</div>

> [@zacharyw.larson](#):
>
> I still think someone at my site remoted to my computer to mess with me

Turn auditing on for the project.

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [May 26, 2023, 4:10pm UTC](https://forum.inductiveautomation.com/t/a-dropdown-shows-select-but-the-value-does-not-change-to-select/74221/11 "2023-05-26T16:10:37Z")

</div>

Is there an audit for my personal designer?

My audit logs only showed when I saved, updated, logged out, logged in, some scheduled reports, and a bunch of unauthenticated scripts doing things.

I see the diagnostics, but I don't see a list of things that were checked, toggled, or entered.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [May 26, 2023, 4:15pm UTC](https://forum.inductiveautomation.com/t/a-dropdown-shows-select-but-the-value-does-not-change-to-select/74221/12 "2023-05-26T16:15:21Z")

</div>

I was leaning towards looking at the timestamp to determine if someone changed something other than you, ie outside of working hours. There is `system.util.audit`, where you can add custom audit messages in a property change event or similar.

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [May 26, 2023, 4:17pm UTC](https://forum.inductiveautomation.com/t/a-dropdown-shows-select-but-the-value-does-not-change-to-select/74221/13 "2023-05-26T16:17:38Z")

</div>

Whatever happened was between 10am to 11am.  
I didn't see any other users in the audit or from the designer.

I was hoping to see if I could find timestamps when some check boxes were checked or property settings changed in the designer, but it would be a pretty tedious log to exist probably.

I had figured if a log like that existed and the timestamps were all checked in a few milliseconds, then it was a bug.  
If the timestamps were seconds apart, then a human, I figure.  
I don't have such a log so I won't know.
