V15 VL-Web: How to get the number of records in the list(#PRIM_LIST).

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
Rieko Saitoh
Posts: 54
Joined: Sat Apr 30, 2016 11:46 am

V15 VL-Web: How to get the number of records in the list(#PRIM_LIST).

Post by Rieko Saitoh » Fri Oct 08, 2021 3:50 pm

Hi,

I would like to get the number of records in the list(#PRIM_LIST) displayed on the web page. Is there any way?
(I'm looking for a method other than counting one by one with "Selectlist".)

Thanks in advance,
Rieko

User avatar
Dino
Posts: 179
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: V15 VL-Web: How to get the number of records in the list(#PRIM_LIST).

Post by Dino » Sat Oct 09, 2021 12:00 am

Hi

Yes, use

Code: Select all

#List.Items.ItemCount
like in this example:

Code: Select all

Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME<MaterialDesignBlue>) Height(488) Width(752)

Define_Com Class(#PRIM_LIST) Name(#List) Displayposition(1) Height(400) Left(0) Parent(#COM_OWNER) Tabposition(1) Top(0) Width(800) Rowlines(False) Columnlines(False) Rowheight(32)
Define_Com Class(#PRIM_LIST.String) Name(#ListColumn1) Columnwidth(140) Displayposition(1) Parent(#List) Sortonclick(True) Source(#EMPNO)

Evtroutine Handling(#Com_owner.Initialize)
Inz_List Named(#List) Num_Entrys(314)
#sys_web.alert Caption(#List.Items.ItemCount.asstring)
Endroutine
End_Com

Rieko Saitoh
Posts: 54
Joined: Sat Apr 30, 2016 11:46 am

Re: V15 VL-Web: How to get the number of records in the list(#PRIM_LIST).

Post by Rieko Saitoh » Mon Oct 11, 2021 4:15 pm

Hi Dino,

Thank you for your reply.
I was able to achieve it by the method you taught me.
Thank you for your kind support!!

Best regards,
Rieko Saitoh

Post Reply