Prim_tree and Sort VL-web V15
Posted: Tue Apr 29, 2025 10:04 pm
Hi.
I have an application with a PRIM_tree and the setup/design is handled in a RP. This has worked fine until now.
Now the customer wants to sort on different fields in this RP.
I have looked at the examples in DEM partition and tried to make it similar, but I can not get it to work
I have this code:
Mthroutine Name(OnSort) Help('Executed when the "Sort" method is used in the Tree') Options(*REDEFINE)
* godkender eller bilagsnummer eller kreditor
Case Of_Field(#Key)
When Value_Is(= "GODK")
When Value_Is(= "BILAG")
When Value_Is(= "KREDITOR")
#Result := #INSACCOUN.Compare ((#CompareTo.Design *As #IBAfvgTreeList).KREDITOR)
Endcase
Endroutine
and it gives me this error:
#INSACCOUN.Compare ((#CompareTo.Design *As #IBAfvgTreeList).KREDITOR) is not a valid name.
#IBAfvgTreeList is the name of the RP
Does anybody have a simpel exsample of the sort with PRIM_TREE and RP and want to share?
/klaus
I have an application with a PRIM_tree and the setup/design is handled in a RP. This has worked fine until now.
Now the customer wants to sort on different fields in this RP.
I have looked at the examples in DEM partition and tried to make it similar, but I can not get it to work
I have this code:
Mthroutine Name(OnSort) Help('Executed when the "Sort" method is used in the Tree') Options(*REDEFINE)
* godkender eller bilagsnummer eller kreditor
Case Of_Field(#Key)
When Value_Is(= "GODK")
When Value_Is(= "BILAG")
When Value_Is(= "KREDITOR")
#Result := #INSACCOUN.Compare ((#CompareTo.Design *As #IBAfvgTreeList).KREDITOR)
Endcase
Endroutine
and it gives me this error:
#INSACCOUN.Compare ((#CompareTo.Design *As #IBAfvgTreeList).KREDITOR) is not a valid name.
#IBAfvgTreeList is the name of the RP
Does anybody have a simpel exsample of the sort with PRIM_TREE and RP and want to share?
/klaus