How to get a PRIM_LIST with a property

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
Posts: 26
Joined: Fri Feb 09, 2018 11:25 pm

How to get a PRIM_LIST with a property

Post by sotos » Mon Sep 24, 2018 11:12 pm


I would like to know how to pass a PRIM_LIST with a property (or is there another way) and fill it from a reusable to another

e.g. In the 1st reusable (#WEBx_C_INFO_PL) I define a list:

Define_Com Class(#PRIM_LIST) Name(#POLLST) Displayposition(2) Left(0) Parent(#ListPanel) Tabposition(2) Top(43) Width(1025) Height(222)
Define_Com Class(#PRIM_LIST.String) Name(#PLCOD) Columncaption('A') Columnwidth(139) Displayposition(7) Parent(#POLLST) Columncaptiontype(Caption) Source(#CVRCOD) Displayalignment(Center)
Define_Com Class(#PRIM_LIST.Number) Name(#PLDSC) Columncaption('B') Columnwidth(97) Displayposition(8) Parent(#POLLST) Columncaptiontype(Caption) Source(#CVRDSC) Displayalignment(Center)

then I define a property for the list:

Define_Pty Name(PR1) Get(*REFERENCE #POLLST)

however when I call the property from the second reusable and try to fill the list:

#CVRCOD := "aa"
#CVRDSC := "bb"

Add_Entry To_List(#WEBx_C_INFO_PL.PR1)

the webpage crashes:

JavaScript Syntax Error:

Unexpected token ?


Posts: 41
Joined: Wed Dec 02, 2015 10:35 am

Re: How to get a PRIM_LIST with a property

Post by Pablo » Tue Sep 25, 2018 12:48 am

Hi Sotiris,

You can't pass around a PRIM_LIST as a component.

You must define the list as a reusable part with certain attributes.

There is an example of this in the shipped web page example: xDemoWebPassingWorkingLists where the list is defined in component xDemoWebPassingWorkingListsEmployeeItem.


Post Reply