このステップでは、リスト・ビューに値を入れるコードを追加していきます。
Clr_List Named(#skills)
#XG_HEAD := *null

Mthroutine Name(uGetSubfilePage)
Define_Map For(*result) Class(#prim_boln) Name(#NextPage)
Define Field(#MoreVal) Type(*char) Length(1)
#listcount := 1
#NextPage := false
Dowhile (#myscreen_wrapper.check_field_exists( "dateacq" #listcount ))
#myscreen_wrapper.getvalue From("dateacq") Value(#vf_eltxts) Defaultvalue(#ddmmyy) Index(#listcount)
#myscreen_wrapper.getvalue From("skillcode") Value(#skilcode) Index(#listcount)
#myscreen_wrapper.getvalue From("skilldesc") Value(#skildesc) Index(#listcount) Defaultvalue("Defalt value")
#myscreen_wrapper.getvalue From("comment") Value(#comment) Index(#listcount)
#myscreen_wrapper.getvalue From("grade") Value(#grade) Index(#listcount)
* You can put some tracing
#com_owner.avframeworkmanager.avRecordTrace Component(#com_owner) Event("Adding entry = " + #vf_eltxts + ", " + #skilcode + ", " + #skildesc + ", " + #grade)
Add_Entry To_List(#skills)
#listcount += 1
Endwhile
* when identifying this screen we set the name of the "+" sign = "moreindicator". The presence of that field in the last row of the subfile tells us whether there is another page. The last row is one less than the current value of #listcount.
#listcount -= 1
If (#myscreen_wrapper.check_field_exists( "moreindicator" #listcount ))
#myscreen_wrapper.getvalue From("moreindicator") Value(#MoreVal) Index(#listcount)
#NextPage := (#MoreVal.trim *NE "")
Endif
Endroutine
Define_Com Class(#prim_boln) Name(#MoreRecords)
#MoreRecords := #com_owner.uGetSubfilePage
If (#MoreRecords)
if (#previousscreen = 'DisplayEmployee')
#myscreen_wrapper.sendkey Key(#myscreen_wrapper.KeyPageDown)

