You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

Limit the rows in a search page

6 replies [Last post]
Guest's picture
Guest

Hi

I have a search page that might return n number of rows.But I need to just display the most recent 10 rows to the user and later on, if he /she wishes to see the other rows, he can use the view all option to see the other rows that the search page might return

Please let me know if this is feasible and how ?

Thanks in advance for your help

Lepa's picture
User offline. Last seen 2 years 7 weeks ago. Offline
Joined: 06/23/2008
Posts: 591
Re: Limit the rows in a search page

The row count that appears is controlled by the occurs count that you set on the General tab in the Grid Properties dialog box. There is an Occurs Count field, so just change that to 10.

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Nitin's picture
User offline. Last seen 5 years 30 weeks ago. Offline
Joined: 06/30/2008
Posts: 73
Re: Limit the rows in a search page

The tools generated search page has by default limit of 300.
If it is a custom search page and you have grid or scroll area on level 1 then you could use occur count as suggested by lepa.
Another way to control the same thing is thru chunking.

Thanks
Nitin

Lepa's picture
User offline. Last seen 2 years 7 weeks ago. Offline
Joined: 06/23/2008
Posts: 591
Re: Limit the rows in a search page

View All will display all rows in the grid unless that number is greater than the GRDRWS max set on the Personalization page (PeopleTools > Personalization > Personalization Options (PPTL). This is on the web.(PIA)
If the number of rows in the grid exceeds the GRDRWS limit, then the hyperlink on the grid will change from "View All" to "View 100" or "View n" n being whatever the GRDRWS max is

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Ashar's picture
User offline. Last seen 4 years 40 weeks ago. Offline
Joined: 03/26/2008
Posts: 227
Re: Limit the rows in a search page

Lepa/Nitin:
I'm just thinking if it would be possible to track the count in the RowSelect event and Discard all rows which are selected after the count reaches the specified number. May be this is a very bad idea. What do you think?

Thanks,

Ashar

Lepa's picture
User offline. Last seen 2 years 7 weeks ago. Offline
Joined: 06/23/2008
Posts: 591
Re: Limit the rows in a search page

RowSelect will limit the number of rows (depending on your criteria) that will get loaded into the buffer. This is different from Occurs Count as all data will still get loaded into the buffer but it just controls how many rows you will be able to see on your grid at one time.

You can use a StopFetching function that will cause the Component Processor to accept the current row of data, and then stop reading additional rows. RowSelect is an insufficient way of filtering out data. I would recommend screening out rows of data using search record views. It is fast and easy to implement.

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Nitin's picture
User offline. Last seen 5 years 30 weeks ago. Offline
Joined: 06/30/2008
Posts: 73
Re: Limit the rows in a search page

Hi Lepa/ Ashar,
The concept is called chunking (as I already mentionedc) in which code loads specific number of row in buffer and give button to navigate to and fro and based on button code will load further data.

The same concept is used on Order Entry page, Billing page, Bill search page etc..

Thanks
Nitin Bhatia