Re: 4GL Q: Popup window from within Construct statement
Posted in 1993
In article <23rt5e$3gv@news.mic.ucla.edu> ggordon@agsm.ucla.edu (Glen Gordon) writes: >dave@das13.snide.com (Dave Snyder) writes: > >>In article <Aug.4.16.30.33.1993.8162@gauss.rutgers.edu> manmetha@gauss.rutgers.edu (Rajesh Malhotra) writes: >>} >>} I am creating the where clause of a select using construct, >>} but when the cursor goes to a particular field, I want to throw up >>} a window and let the user select one of the available values. How >>} would I do this from within construct? >>} >>} From within INPUT ARRAY, I can do this using the ON KEY and >>} the INFIELD() function, figure out which field the cursor is on, and >>} throw up a Window and let the user pick one value from a list. >>} >>Assuming you are using Informix-4GL 4.10 or higher, you do the EXACT >>same thing. >Yes, but with an input statement, the value of the item which the user >selects from a pop-up window can be assigned to the associated input >field. With Construct, there doesn't seem to be a way to do anything >with a value returned from a pop-up. Wrong. You do this: FUNCTION construct_rtn() DEFINE value CHAR(70) # Size needs to be as long as the longest field to # be popped up on. CONSTRUCT global_buffer ON tablename.* FROM screen_record.* ON KEY(F2) IF infield(field_1) THEN CALL popup_rtn() RETURNING value # This will display and link value to the field buffer DISPLAY value to field_1 END IF END CONSTRUCT -- Robert Minter Data Systems Support Programmer, Software Development Orange, CA internet: rob@dssmktg.com Tel: 714.771.0454 bangpath: uunet.uu.net!dssmktg!rob Fax: 714.771.3028