Title: input array with hidden field Post by: Luca B. on June 26, 2017, 02:17:18 pm Hi all,
i have a problem with my input array. if try to create an input array for example: define arr_val dynamic array of Title: Re: input array with hidden field Post by: Luca B. on June 26, 2017, 02:33:02 pm sorry the post was not finished
Hi all, i have a problem with my input array. i use GST 3.00.22 and GDC 3.00.21 if try to create an input array like this example: define arr_val dynamic array of record rec1 string, rec2 string, rec3 string, rec4 string end record dialog input array arr_val from record1.* attribute (UNBUFFERED, WITHOUT DEFAULTS) BEFORE ROW let arr_val[dialog.getcurrentRow('record1')].rec1 = 'example' after row ####### here i have the problem end input end dialog if the column relative to "rec1" is hidden in my 4fd form file, when i read the current value of rec1 in the after row the value is null (the expected value is "example "). anyone have the same problem? thank you Title: Re: input array with hidden field Post by: Rene S. on June 26, 2017, 06:21:13 pm You're using BEFORE ROW to initialize the target variable? That's the wrong place. Use BEFORE INSERT. BEFORE ROW will be called for existing and new rows. BEFORE INSERT will be called for new rows only. The initialization of the new row happens when returning from BEFORE ROW and before entering BEFORE INSERT.
Some other remarks: you can simplify your code: The builtin function arr_curr() returns the index of the current row in the current context. Calling "dialog.getcurrentRow('<screen-record-name>')" is only required when accessing the current row of another dialog or another sub-dialog. Code
Title: Re: input array with hidden field Post by: Luca B. on June 27, 2017, 02:35:05 pm i tried with BEFORE INSERT and it work fine. thanks
i use dialog.getcurrentRow() because i have 5 input array and if i use arr_curr() sometimes it doesn't work fine and return the row of another array. thank you |