Hello, I have a dropdown that takes it’s data from an MySQL query. It’s a list of preset value an when selected it fills the form. No biggie there.
What I also have on that for is a save button in case I change values on that form and want to keep it as preset and then refresh my dropdown query so that the new preset is in…
My problem is that when I save my SELECTED dropdown goes back to its last value instead of the new preset one, hense swapping all values from the form to the last preset values.
I would like after the refresh, my new preset would be selected in the dropbox.
Here is where I am so far
qryCreateTickets = """INSERT INTO tblpresetLotPalette (strDimension, strCommentaire, strEssence, strGrade, intPieces, intTE, strTF, intWE, strWF, intLE, strLF) VALUES (?,?,?,?,?,?,?,?,?,?,?) """ ##Dimension is the name of the preset and everything else is an attribute system.db.runPrepUpdate(qryCreateTickets, [Dimension, Commentaire, Essence, Grade, Pieces,TE, TF, WE, WF, LE, LF]) ##Refresh the dropdown data system.db.refresh(event.source.parent.parent.getComponent('Dropdown'), "data") ##Here's the problem, I can't force the dropdown to take the string Dimension(The name of the new preset) as it's selected event.source.parent.parent.getComponent('Dropdown').selectedStringValue = Dimension