Re: form and display array

Michal Hajek <[email protected]>
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <CAJ7z5aew-C-+OA07K2AP4riRSn+se8C0YGY9P75BqcXFb7YoUw@mail.gmail.com>
Thanks :-) Loop for display works.

And to second question - what is correct way how to read data from form like

screen
{
-[prac
]======================================================================¬
¦č:[f000]        Datum:[datum     ][den       ]    Jídlo:[J ]
[jtxt           ]¦
¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
¦[dieta  ] [poc][nazev               ]
[komentar                              ]¦
¦[dieta  ] [poc][nazev               ]
[komentar                              ]¦
¦[dieta  ] [poc][nazev               ]
[komentar                              ]¦
¦[dieta  ] [poc][nazev               ]
[komentar                              ]¦
¦[dieta  ] [poc][nazev               ]
[komentar                              ]¦
¦[dieta  ] [poc][nazev               ]
[komentar                              ]¦
¦[dieta  ] [poc][nazev               ]
[komentar                              ]¦
¦[dieta  ] [poc][nazev               ]
[komentar                              ]¦
¦[dieta  ] [poc][nazev               ]
[komentar                              ]¦
¦[dieta  ] [poc][nazev               ]
[komentar                              ]¦
¦[dieta  ] [poc][nazev               ]
[komentar                              ]¦
¦[dieta  ] [poc][nazev               ]
[komentar                              ]¦
¦[dieta  ] [poc][nazev               ]
[komentar                              ]¦
¦[dieta  ] [poc][nazev               ]
[komentar                              ]¦
¦[dieta  ] [poc][nazev               ]
[komentar                              ]¦
¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
¦ Celkem: [cpocet]  diet               Zapsal: [uziv    ]  [kdy_d
][kdy_c] ¦
L==============================================================================-

}
end
attributes
f000 = formonly.ic type integer,noentry,noupdate;
prac = formonly.prac type char,noentry,noupdate;
den = formonly.den type char,noentry,noupdate;
datum = formonly.datum type date;
J = formonly.jidlo type char,upshift;
jtxt  = formonly.jtxt type char,noentry,noupdate;
cpocet = formonly.cpocet type smallint;
poc = formonly.poc type smallint;
dieta = formonly.dieta type char;
nazev = formonly.nazev type char,noentry,noupdate;
komentar = formonly.komentar type char;
uziv = formonly.uziv type char,noentry,noupdate;
kdy_d = formonly.zapd type date,noentry,noupdate;
kdy_c = formonly.zapt type datetime hour to minute,noentry,noupdate;
end

instructions
 screen record a1_s (
  formonly.ic,
  formonly.prac,
  formonly.datum,
  formonly.den,
  formonly.jidlo,
  formonly.jtxt,
  formonly.cpocet,
  formonly.uziv,
  formonly.zapd,
  formonly.zapt
  )
 screen record a2_s[15] (
  formonly.dieta,
  formonly.poc,
  formonly.nazev,
  formonly.komentar
  )
 delimiters "  "
end

I need to read both header (non array) and detail (array) fields.

Thanks, Michal


On Mon, Dec 16, 2013 at 11:39 AM, Mike Aubury <[email protected]> wrote:

> There used to be two ways to do this..
> 1) Use a loop to display VAR_ARRAY[a].* TO scr_array[a].*
> 2) Use a BEFORE DISPLAY/EXIT DISPLAY
>
> I always preferred 1) - because I dont think 2) was available in earlier
> versions of Informix 4GL...
>
>
> On 16 December 2013 10:10, Michal Hajek <[email protected]> wrote:
>
>> Hi,
>>
>> I am stuck in header - detail form.
>>
>> a) What is the correct way how to display -and only display- array to a
>> form?
>>
>> display array VAR_ARRAY to SCR_ARRAY_RECORD.*
>>
>> displays array, BUT cursor stays in the array and waits for key. I need
>> just to display the data and continue in program.
>>
>> b) What is correct way how to input both header (simple record) and
>> detail (array) form data?
>>
>> Thanks, Michal
>>
>>
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
>> Pro!
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Aubit4gl-discuss mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
>>
>>
>

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk

_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.