Variable number of lines in a TableRecord

Variable number of lines in a TableRecord

  
Is it possible to have a variable number of lines in a TableRecord?

I tried to set the value 'Line Count' of a TableRecord to a local variable 'LinesPerPage' (type Integer). There is an Input field on the page, linked to this variable, so the user can fill in the number of lines he wants to see on a page.

When I do this I get an error : Invalid Numeric Value - 'Line Count value must be set to a numeric value in TableRecords1. Either 'Interger' or 'Decimal'.

Thanks in advance,

Dick

Hi Dick,

 

You can set a high Line Count in the TableRecords widget and then set the Max Records property of the Query that is feeding that widget to the required value.

 

Cheers,

Tiago Simões

Hi Tiago,

Thanks for your quick respons.

This works for the first page. But the pages 2,3,4,..... are empty.

Let say there are 100 records retrieved from the feeding query. LinesPerPage is set to 20. When I set the Max Records to LinesPerPage the first 20 lines will be retrieved and shown. But then page 2. Therefore I need line 21 to 40, and for page 3 line 41 to 60 and so on . How do I achieve that with this method?

Greetz,

Dick

Hi Dick,

 

In that case you will need to set the MaxRecords to be StartIndex + LineCount and set the Start Index property in the TableRecords widget.

 

Cheers,

Tiago Simões

Tiago,

I tried to implement this but how can I determine the value of startindex. My problem is : In the 'RichWidgets\List_navigation', which is linked to the TableRecords, I can click on next or preveous but also on a specific page number. How do I know what is click so I can determine the startindex.

Greetz,

Dick

Hi,

 

You can use RichWidget's List_Navigation_GetStartIndex() action.

 

Cheers,

Tiago Simões 

Hi Tiago,

I used this function to get the startindex, but apperently not on the right places. Now it works the way I expect.

Thanks a lot for your help

Greetz,

Dick Dokter