Re: [Q] Display on construct's
Posted in 1995
Luis Miguel Agudelo Jimenez writes: * * * On Tue, 28 Nov 1995, Robert Minter wrote: * * > Luis Miguel Agudelo Jimenez writes: * > * * > * Hello, * > * * > * I'm working with Informix 4GL-RDS V4.11 on a HP-Unix System and I'm * > * found with this problem: * > * * > * I have a construct like this, * > * * > * * > * CONSTRUCT BY NAME field1, ... * > * ON KEY(f7) * > * IF INFIELD(field1) THEN * > * CALL fEditAndSelect() RETURNING cod,descri * > * LET field1 = descri * > * * > * DISPLAY BY NAME field1 * > * * > * END IF * > * * > * ... * > * * > * END CONSTRUCT * > * * > * > You're close. Try it like this: * > * > CONSTRUCT BY NAME field1, ... * > ON KEY(F7) * > IF INFIELD(field1) THEN * > CALL fEditAndSelect() RETURNING cod, descri * > DISPLAY descri TO field1 * > END IF * > * > ... * > * > END CONSTRUCT * * * Thanks for your reply Robert, * * The original post was incorrect because of a bad day, I supose. The * construct should be: * * CONSTRUCT BY NAME q_que on field1,field2,... * * ON KEY (f7) * IF INFIELD(field1) THEN * CALL fEditAndSelect() RETURNING cod, descri * display descri to field1 * END IF * * ... * END CONSTRUCT * * * The problem is in the fEditAndSelect function. It has an input array and * return one row (return p[i].cod, p[i].descri). The returned values are of * the same type that cod and descri. * * I have verify that the problem is the input array of the function. If * instead of the input array I use a display array or simply I return two * values the construct keeps the value displayed. * * What's happening? We've verified that this is a bug. Don't know if it has a valid bug number, tho. If you are within a CONSTRUCT and call a function which uses the INPUT or INPUT ARRAY, the CONSTRUCT doesn't store ANY more DISPLAYed values from then on. You are correct in changing the called function to use DISPLAY ARRAY. Robert Minter Data Systems Support \\\\\\_/// Senior Software Engineer A Client Technologies Company ( _ _ ) E-Mail: rob@dssmktg.com Tel: 714.771.0454 (| ^ |) #include <disclaimer.h> Fax: 714.771.3028 \\`-'/ De Colores - Emmaus OC-13 SURF'S UP \\_/