Quote:
Originally Posted by mlevit
Hi,
I need to obtain the value of the selected item from a combo box.
- BEGIN
-
IF :LOGIN_BLOCK.USER_TYPE = 'Student' THEN
-
:GLOBAL.student_id := :LOGIN_BLOCK.ID;
-
CALL_FORM(:GLOBAL.project_path || 'ENROLLMENT_FORM.fmx');
-
ELSE
-
:GLOBAL.staff_id := :LOGIN_BLOCK.ID;
-
END IF;
-
END;
That is the code I have to do this but it doesn't work, it always accesses the else section of the statement.
The LOGIN_BLOCK is the data block, and the USER_TYPE is the combo box that contains "Student" and "Staff".
I need the If statement to see which one is selected so that a global variable can be assigned a value and a specific form can be called.
Thanks
Check below Steps:
1. Go to the property palatte of the COMBO BOX.
2. For the property "Element In the List", click on that.It will display LIST OF ELEMENTS WINDOW
3. Check the LIST ELEMENT and LIST ITEM VALUE associated with the LIST ELEMENT.
Eg: For LIST ELEMENT = 'Student' LIST ITEM VALUE also should be equal to 'Student'. Only then your IF condition will Work.