Page 1 of 1

VLWEB Tree

Posted: Fri Mar 02, 2018 4:24 pm
by soa
I have a RP with a tree defined as

Define_Com Class(#PRIM_TREE<#eFormTextLine>) Name(#treeItems) Displayposition(2) Left(0) Parent(#COM_OWNER) Tabposition(2) Top(50) Height(220) Width(500)

I'm loading it thus

Define_Com Class(#Prim_tree.TreeItem) Name(#Result) Reference(*DYNAMIC)

#WRK5000 := 'This is the first line'
#Result <= #treeItems.Add( #eFormTextLine )

#WRK5000 := 'This is the second line'
#Result <= #treeItems.Add( #eFormTextLine )

eFormTextLine is defined as

Begin_Com Role(*EXTENDS #PRIM_PANL *implements #Prim_Tree.iTreeDesign *ListFields #ListFields)

Group_By Name(#ListFields) Fields(#WRK5000)

Under debug in the OnAdd method the field #WRK5000 is blank. I thought it would contain 'This is the first line' etcetera based on the *ListFields

Mthroutine Name(OnAdd) Options(*Redefine)
#lblTextLine := #wrk5000

Endroutine

What am I doing wrong? I'm a bit rusty!

Cheers

Re: VLWEB Tree

Posted: Fri Mar 02, 2018 5:08 pm
by dannyoorburg
Hi,

I think you need to use the ADD_ENTRY command for the field-mapping to work... I'm not sure it runs as part of the Add method.

Danny

Re: VLWEB Tree

Posted: Fri Mar 02, 2018 5:18 pm
by soa
Thanks Danny, you are spot on!