Hansel Gaete · Nov 19, 2018 1m read

Pagination with filters

Working on a proyect with :

Cache Object Script, Jquery and Bootstrap :

I have a big problem to do pagination with parameter, to query filter and registry limitation, but i find a solution using session and global:

Set FilterDate = %request.Get("df")
If (FilterDate=""){
    Set FilterDate = $Get(^NSSession(%session.SessionId,"FilterDate"))
If (FilterDate'=""){
    Set ^NSSession(%session.SessionId,"FilterDate") = FilterDate

Previously i write the code centred on $request, but this have a problem when you navigate for more than 2 pages on pagination links, loosing filter and sending you to same number page, but without filter.

Thanks for read !! 

0 1 224 1


What version are you using?

I think you can benefit from REST API architecture, so FilterDate would be a url parameter (esp. if it's the only one).