I AM HAVING A DROPDOWN CONTROL. I WANT TO GET THE SELECTED VALUE FROM DROPDOWN CONTROL INTO A VARIABLE AND THEN USE THAT VARIABLE IN SWITCH CASE AND PERFORM TEH REQUIRED ACTIONS. I AM NOT ABLE TO GET THE CONTROL NAME ON THE FORM AND SO WHEN CONTROL NAME IS WRITTEN ON TEH CLICK EVENT OF THE BUTTON ITS SHOWING ERROR AS VARIABLE NOT DEFINED.
CAN ANY ONE PLS HELP ME AS HOW CAN I GET THE SELECTED VALUE FROM DROPDOWN LIST INTO A STRING VARIABLE AND THEN USE IT IN SWTCH CASE.
Thanks for your immedite help. I did auto declaration = yes but still in the form i m not able to get the Control name . When ever i write the control name it shows error like variable not declared and due to this i m not able get .selected or .text options
may be I didn’t correctly understand your problem, to get your control name, set autodeclaration = yes and use the following code yourControlName.name(), returns a string with the value of the name property of your control.
if I do InventJournalTrans_ItemId.text() or .valueStr() gives me the content I modified
I’m afraid I don’t understand correctly your problem, but if you want to access properties of controls, you don’t have choice, it’s autodeclaration = yes, to get the value of your control it depends on the dataType behind your control, mostly it’s yourControlName.text() or value() or valuestr()
Could you explain exactly what you want? which datatype is behind your combo(enum, real, int, str etc), which kind of control is your combo (stringEdit, realEdit, comboBox etc…)