Hey all,
I am trying to find out what's going on with my drop down lists. I have their selected values (labels in one case) bound to a named query. Everything works fine until I save the project. The client reloads, and it seems that the selectedLabel
property change event fires and updates the database with incorrect values.
The propertyChange
script checks for this property:
if event.propertyName == 'selectedLabel':
newValue = event.source.selectedLabel
and if the property changes when a user updates the selection, it will fire an update query. But it fires every time the client reloads!
This drop down's data is bound to a single column list from a DB table.
SELECT [SerialNumber]
FROM [temp].[Lids_Metal_Oamb]
WHERE [Oamb] = 1
The Selected Label
is bound to a query that finds the last updated value from a DB table. So, when the screen loads, each drop down should be populated with the correct value from the DB.
SELECT SerialNumber
FROM [temp].[Oamb_Location]
WHERE OL_ID = 2
Notes:
I am using Lenient
selection mode.
I am not actively using/binding anything to the No Selection
properties, as each drop down should display an actual value.
Lastly, when the script fires on the client reload, the values that get entered into the DB are: <Select One>
, which is the value of the No Selection Label
.
The questions are:
What are the drop down list boxes doing, or maybe why are they firing the property change event on the selectedLabel
when the client loads?
How can I prevent them from firing when the client loads, and is this what I need to do?
Thank you!