I have a Named Query "SelectData":
Select short , long , part ,
length , location , height , number ,
position01 , position02, position03, position04 , position05 ,
position06 , position07 , position08 , position09 , position10 ,
position11 , position12 , position13 , position14 , position15 ,
position16 , position17 , position18 , position19 , position20 ,
position21 , position22 , position23 , position24 , position25 ,
position26 , position27 , position28 , position29 , position30
from table
where name = :qname
This works fine, I tested it.
Now I have a button and I want to place query results into Text Fields.
Under the button action:
#grab query value
qname = event.source.parent.getComponent('Text Field 3').text
#run query
result = system.db.runNamedQuery("SelectData", {"qname":qname})
#Place Results in Text Fields
event.source.parent.getComponent('Text Field 1').text = result["short"]
event.source.parent.getComponent('Text Field 2').text = result["long"]
I get errors on the placing of the results in text fields.