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

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.

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.

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.
1 Like

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.

if value.line != '' and value.sort != '':
    # return named query
else:
    return ''
1 Like

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

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.


This solution works, but I need a way to do the change that is easy to track.

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.

There is:
image

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.

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.

1 Like

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

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.

Turn auditing on for the project.

2 Likes

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.

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.

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.