@Cristian_Gomez I hope you don't mind me jumping on your train, but rather than posting a new thread on the same topic, and I hope this helps you and others and helps me to solve my current issue.
Imagine four drop downs and one table. This feature allows for creating and deleting multi-part locations for our system.
Each drop downs' options are bound to a query. The table has a custom prop,
table_data
to which the
table.props.data
is bound. (I'll call this
Query1)
The first three drop downs will enable the drop down below it, get the selected value of the previous drop downs, and send those parameters to a named query, (I'll call this
Query2) then set the
table.custom.table_data
to the result set of the named query. This is done via scripting on the
onSelect
event of each drop down. The results in the table are filtered down each time the event fires, so that when I want to add a new location I can see if that location already exists. This setup works, as I mentioned in an above post, I just don't like the way the events (
@pgriffith)

work, as I am used to a slightly better event setup in MS Access (at least for this type of component).
Example of the first drop down script:
def runAction(self, event):
namedQuery = "INV/v_Bin_Crud_Filtered"
area = self.props.value
params = {"p_Area":area}
self.parent.parent.parent.getChild("flx_TableArea").getChild("Table").custom.table_data = system.db.runNamedQuery(namedQuery, params)
self.getSibling("cbo_Aisle").props.enabled = True
My frustration is that this same setup, with four drop downs and one table, is not working in another view.
This is another location system used for something else. Each drop down is set up the same way, as is the table.
Here is the script from the first drop down:
def runAction(self, event):
namedQuery = "AST/v_Asset_Locs_Cbo_Filtered"
bldg = self.props.value
params = {"p_Bldg":bldg}
self.parent.parent.getChild("coord_Right").getChild("Table").custom.table_data = system.db.runNamedQuery(namedQuery, params)
self.getSibling("cbo_Asset_Area").props.enabled = True
I have set print statements in the onSelect
events of each drop down, and the variables are getting the correct values. When I test the named query directly, the correct result set is returned. For some reason the result set is not returning to the table. BTW - both table.custom.table_data
are set to Return Format: Auto
. This works for the first example just fine, and changing it to dataset
has no affect, which I expected.
So, in the second example, to test further, I went to both of the named queries and in the SELECT
statement, named each column in the same order as the table column names. This had no affect, which I expected. I also, just for grins and giggles, added a text area bound to the return set and, as expected, when the table has an empty set, so does the text area.
To clarify the operation here, after selecting the value from the first drop down, the table is empty.
Anyway, when I click the second drop down, the table has a data set and lastly, when I select an item from the third drop down, the data set is empty again. ( I just realized that the first and third drop downs are set to onActionPerformed
, but I forgot to change the second one. After setting them all to onActionPerformed
I get no data sets returned until I hit the "Clear" button.)
That's all I have for now.