Re: FourGen: Hierarchy level
Posted in 1995
Vadim Park (pivot@taxpol.krasnoyarsk.su) wrote: : Hi Fourgeners, : I use I4GL Forms v.4.10 and Online v.5.0 (Interactive Unix). : I need to add on a header with it's details on the same form. : Is there a workaround to have header/detail as add_on_header form? : What is Fourgen's development application strategy for logical data model : which has hierarchy level more than 3 ? Hi Vadim, You have two choises: 1. Create another .4gi with your header/detail form (Forms recommend this). 2. Generate add-on-header form and add-on-detail one, use .ext files to establish communication between them, write function (swtch_scr(scr_id, scr_funct)) which saves status and calls function in detail module, and rewrite add-on-header.frm by your-add-on-header-detail.frm, which contains both header and detail form. I spent a little time to make it work. Basic entries in .ext files follow (I leaved here only apropriate parts of them, so it wouldn't work): start file "ahead.4gl" after block C_ahead init # clear detail variables CALL swtch_scr("adet","clear"); after block EV_ahead tab # input detail CALL SH_ahead() CALL swtch_scr("adet","input") LET scratch = get_vararg() CALL flush_vararg() IF scratch = "tab" THEN LET nxt_fld = scr_fld ELSE LET nxt_fld = "exit input" END IF after block SH_ahead display # display detail CALL swtch_scr("adet","showdata") in block I_ahead exit_input after "then" # clear form after interrupt key CALL C_ahead() CALL SH_ahead() LET int_flag = TRUE; after block R_ahead on_disk_read CALL put_vararg("join_elems") CALL put_vararg(p_ahead.join_key) CALL swtch_scr("adet","read"); after block W_ahead write CALL swtch_scr("adet","write"); start file "adet.4gl" after block EV_adet tab # return to input header LET tab_pressed = TRUE LET nxt_fld = "exit input"; after block I_adet end_while # parameter passed to header IF tab_pressed THEN CALL put_vararg("tab") ELSE CALL put_vararg("exit input") END IF; before block DS_adet display_array # set count of detail rows CALL set_count(arr_cnt); It's tricky, but works. I told you my personal opinion on such tricks, but I hope, it helps you. -- Zdeno Miklas e-mail: ash@softec.sk SOFTEC spol. s r. o. phone : 42-7-273805 ext.128 Kutuzovova 23 fax : 42-7-272537 831 03 Bratislava SLOVAKIA