Restoring search params from grid after update

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Restoring search params from grid after update

stevepiercy
Just to confirm, when you use Quicksearch to filter records,
then select one record, then edit and save it, the Quicksearch
params are restored and the search is performed on the grid.

However if you insert custom searches, like date ranges and the
like, then edit and save a record, those parameters are not restored.

Has anyone developed a technique to restore search params and
perform the custom search?  I would like to avoid reinventing
the wheel.  My first idea would be to store the params in a
session cookie.  Any other suggestions welcome.

--steve

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|

Re: Restoring search params from grid after update

list
6 feb 2011 kl. 04.27 skrev Steve Piercy - Web Site Builder:

> Just to confirm, when you use Quicksearch to filter records, then select one record, then edit and save it, the Quicksearch params are restored and the search is performed on the grid.
>
> However if you insert custom searches, like date ranges and the like, then edit and save a record, those parameters are not restored.
>
> Has anyone developed a technique to restore search params and perform the custom search?  I would like to avoid reinventing the wheel.  My first idea would be to store the params in a session cookie.  Any other suggestions welcome.

I have no recommended way of dealing with advanced search.
In fact I see the lack of support for search as the one major hole in Knops feature set.
Been thinking some on how support for search beyond quicksearch could be implemented. Guess it's something that should be built into the knop_form type. Maybe with a specific keyword like -searchform and support for buttons like search and reset. And then a way to store the search params. Either by adding them to links like is done with quicksearch params or by storing them. For storage we already have the user object so shouldn't be a need to create a specific cookie for that.

HDB
Jolle
--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|

Re: Restoring search params from grid after update

stevepiercy
On 2/6/11 at 10:58 AM, [hidden email] (Jolle Carlestam) pronounced:

>6 feb 2011 kl. 04.27 skrev Steve Piercy - Web Site Builder:
>
>>Just to confirm, when you use Quicksearch to filter records,
>>then select one record, then edit and save it, the Quicksearch
>>params are restored and the search is performed on the grid.
>>
>>However if you insert custom searches, like date ranges and
>>the like, then edit and save a record, those parameters are
>>not restored.
>>
>>Has anyone developed a technique to restore search params and
>>perform the custom search?  I would like to avoid reinventing
>>the wheel.  My first idea would be to store the params in a
>>session cookie.  Any other suggestions welcome.
>
>I have no recommended way of dealing with advanced search.
>In fact I see the lack of support for search as the one major hole in Knops feature set.
>Been thinking some on how support for search beyond quicksearch
>could be implemented. Guess it's something that should be built
>into the knop_form type. Maybe with a specific keyword like
>-searchform and support for buttons like search and reset. And
>then a way to store the search params. Either by adding them to
>links like is done with quicksearch params or by storing them.
>For storage we already have the user object so shouldn't be a
>need to create a specific cookie for that.

Hmm... yeah, it's a larger beast than I first thought.

If it ends up using a session cookie, I intended to reuse the
knop_user type.

I'll have to look at python frameworks that have a grid w/filter
 > edit record > grid w/restore search feature and see how they
implement such a critter.  Hopefully I can find a client who
wants to fund this feature enhancement.

--steve

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|

Re: Restoring search params from grid after update

list
6 feb 2011 kl. 11.29 skrev Steve Piercy - Web Site Builder:

> On 2/6/11 at 10:58 AM, [hidden email] (Jolle Carlestam) pronounced:
>
>> 6 feb 2011 kl. 04.27 skrev Steve Piercy - Web Site Builder:
>>
>>> Just to confirm, when you use Quicksearch to filter records, then select one record, then edit and save it, the Quicksearch params are restored and the search is performed on the grid.
>>>
>>> However if you insert custom searches, like date ranges and the like, then edit and save a record, those parameters are not restored.
>>>
>>> Has anyone developed a technique to restore search params and perform the custom search?  I would like to avoid reinventing the wheel.  My first idea would be to store the params in a session cookie.  Any other suggestions welcome.
>>
>> I have no recommended way of dealing with advanced search.
>> In fact I see the lack of support for search as the one major hole in Knops feature set.
>> Been thinking some on how support for search beyond quicksearch could be implemented. Guess it's something that should be built into the knop_form type. Maybe with a specific keyword like -searchform and support for buttons like search and reset. And then a way to store the search params. Either by adding them to links like is done with quicksearch params or by storing them. For storage we already have the user object so shouldn't be a need to create a specific cookie for that.
>
> Hmm... yeah, it's a larger beast than I first thought.
>
> If it ends up using a session cookie, I intended to reuse the knop_user type.
>
> I'll have to look at python frameworks that have a grid w/filter > edit record > grid w/restore search feature and see how they implement such a critter.  Hopefully I can find a client who wants to fund this feature enhancement.

I intend to make this a part of Knop for Lasso 9. So if we can come up with some ideas on how it should look I have the funding to implement it (Lasso 9). As in doing it myself. :-)

HDB
Jolle
--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|

Re: Restoring search params from grid after update

Johan Solve-2
In reply to this post by stevepiercy
I'm pretty sure you should be able to add the search field names to a nav -param array for both the edit location (and maybe also the list location). We've had long winded discussions about this a few times and I fail to remember the conclusion.

Another option is to name the search fields with leading dash, as those will be propagated through a form automatically (unless you specify -noautoparams when creating the form object).

At 19.27 -0800 2011-02-05, Steve Piercy - Web Site Builder wrote:

>Just to confirm, when you use Quicksearch to filter records, then select one record, then edit and save it, the Quicksearch params are restored and the search is performed on the grid.
>
>However if you insert custom searches, like date ranges and the like, then edit and save a record, those parameters are not restored.
>
>Has anyone developed a technique to restore search params and perform the custom search?  I would like to avoid reinventing the wheel.  My first idea would be to store the params in a session cookie.  Any other suggestions welcome.
>
>--steve
>
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>Steve Piercy               Web Site Builder
>Soquel, CA
><[hidden email]>                  <http://www.StevePiercy.com/>
>
>
>--
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list <[hidden email]>.
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>
>List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>Project homepage http://montania.se/projects/knop/
>Google Code has the latest downloads at http://code.google.com/p/knop/


--
     Johan Sölve    [FSA Member, Lasso Partner]
     Web Application/Lasso/FileMaker Developer
     MONTANIA SOFTWARE & SOLUTIONS
http://www.montania.se   mailto:[hidden email]
 (spam-safe email address, replace '-' with 'a')

--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|

Re: Restoring search params from grid after update

Rick Draper
In reply to this post by list
> I intend to make this a part of Knop for Lasso 9. So if we can come up with some ideas on how it should look I have the funding to implement it (Lasso 9). As in doing it myself. :-)
> Jolle

Jolle, it might be worth looking at the technique I currently use for "Last Search" and seeing if that can be incorporated as well.

Very best regards,


Rick

--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|

Re: Restoring search params from grid after update

stevepiercy
In reply to this post by Johan Solve-2
On 2/6/11 at 8:19 PM, [hidden email] (Johan Solve) pronounced:

>I'm pretty sure you should be able to add the search field
>names to a nav -param array for both the edit location (and
>maybe also the list location). We've had long winded
>discussions about this a few times and I fail to remember the conclusion.

I don't think you can do that with custom search forms.  See:
http://lasso.2283332.n4.nabble.com/grid-decorate-pagination-links-with-custom-search-get-params-tt3158416.html

>Another option is to name the search fields with leading dash,
>as those will be propagated through a form automatically
>(unless you specify -noautoparams when creating the form object).

I could not get this to work with a custom search.

It looks like you can have one or the other but not both.  If
anyone has an actual working example with a custom search form,
please share.

--steve

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|

Re: Restoring search params from grid after update

list
I know I've struggled with advanced search in the past but never in a satisfactory way. It's long ago. Will have to look at it again for the project we're working on now but I'm not there yet.

So, no, no good examples to share.

HDB
Jolle

7 feb 2011 kl. 11.40 skrev Steve Piercy - Web Site Builder:

> On 2/6/11 at 8:19 PM, [hidden email] (Johan Solve) pronounced:
>
>> I'm pretty sure you should be able to add the search field names to a nav -param array for both the edit location (and maybe also the list location). We've had long winded discussions about this a few times and I fail to remember the conclusion.
>
> I don't think you can do that with custom search forms.  See:
> http://lasso.2283332.n4.nabble.com/grid-decorate-pagination-links-with-custom-search-get-params-tt3158416.html
>
>> Another option is to name the search fields with leading dash, as those will be propagated through a form automatically (unless you specify -noautoparams when creating the form object).
>
> I could not get this to work with a custom search.
>
> It looks like you can have one or the other but not both.  If anyone has an actual working example with a custom search form, please share.
>
> --steve

--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|

Re: Restoring search params from grid after update

stevepiercy
In reply to this post by stevepiercy
I think I found a solution to this problem.

var('f')=knop_form(
        -database=$d,
        -formaction=($nav->url(-path='mypath')+'?'+client_getargs), // real URL path
        -method='post',
        -actionpath='mypath/edit'); // framework action path

Just append to the formaction:

+'?'+client_getargs

In my cursory testing it works. Is it really that simple? Can someone else have a go at it? I'm used to this stuff being so difficult, that I can't believe it would be so simple!

--steve
Reply | Threaded
Open this post in threaded view
|

Re: Restoring search params from grid after update

Rick Draper
In reply to this post by stevepiercy
Hi Steve,

There are situations in our use of Knop where we would not want to expose all the search params in the URL, but perhaps putting them into a session variable is the way to go.  Outside Knop, we have used a technique for may years where we store the last SQL query made by an operator in the session table and give them a quick link called "Last Search" on most pages.. that we if they need to head off and do something else they can come back to the very page/search results on which they left.

Very best regards,


Rick


-----Original Message-----
From: Knop Framework Discussion [mailto:[hidden email]] On Behalf Of stevepiercy
Sent: Thursday, 14 July 2011 10:06 PM
To: Knop Framework Discussion
Subject: Re: Restoring search params from grid after update

I think I found a solution to this problem.

var('f')=knop_form(
        -database=$d,
        -formaction=($nav->url(-path='mypath')+'?'+client_getargs), // real URL path
        -method='post',
        -actionpath='mypath/edit'); // framework action path

Just append to the formaction:

+'?'+client_getargs

In my cursory testing it works. Is it really that simple? Can someone else have a go at it? I'm used to this stuff being so difficult, that I can't believe it would be so simple!

--steve

--
View this message in context: http://lasso.2283332.n4.nabble.com/Restoring-search-params-from-grid-after-update-tp3262539p3667369.html
Sent from the Knop Framework Discussion mailing list archive at Nabble.com.

--
#############################################################
This message is sent to you because you are subscribed to the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]> Send administrative queries to  <[hidden email]> List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/ Google Code has the latest downloads at http://code.google.com/p/knop/



--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|

Re: Restoring search params from grid after update

stevepiercy
Hi Rick,

Yeah, I can see that not exposing the params and using a session
is one way of handling it.

I wondered whether anyone else has tried or tested this
non-session method?

--steve


On 7/14/11 at 5:39 PM, [hidden email] (Rick Draper) pronounced:

>Hi Steve,
>
>There are situations in our use of Knop where we would not want
>to expose all the search params in the URL, but perhaps putting
>them into a session variable is the way to go.  Outside Knop,
>we have used a technique for may years where we store the last
>SQL query made by an operator in the session table and give
>them a quick link called "Last Search" on most pages.. that we
>if they need to head off and do something else they can come
>back to the very page/search results on which they left.
>
>Very best regards,
>
>
>Rick
>
>
>-----Original Message-----
>From: Knop Framework Discussion [mailto:[hidden email]]
>On Behalf Of stevepiercy
>Sent: Thursday, 14 July 2011 10:06 PM
>To: Knop Framework Discussion
>Subject: Re: Restoring search params from grid after update
>
>I think I found a solution to this problem.
>
>var('f')=knop_form(
>-database=$d,
>-formaction=($nav->url(-path='mypath')+'?'+client_getargs), // real URL path
>-method='post',
>-actionpath='mypath/edit'); // framework action path
>
>Just append to the formaction:
>
>+'?'+client_getargs
>
>In my cursory testing it works. Is it really that simple? Can
>someone else have a go at it? I'm used to this stuff being so
>difficult, that I can't believe it would be so simple!
>
>--steve
>
>--
>View this message in context: http://lasso.2283332.n4.nabble.com/Restoring-search-params-from-grid-after-update-
>tp3262539p3667369.html
>Sent from the Knop Framework Discussion mailing list archive at Nabble.com.
>
>--
>#############################################################
>This message is sent to you because you are subscribed to the
>mailing list <[hidden email]>.
>To unsubscribe, E-mail to: <[hidden email]> Send
>administrative queries to  <[hidden email]>
>List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>Project homepage http://montania.se/projects/knop/ Google Code
>has the latest downloads at http://code.google.com/p/knop/
>
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|

Re: Restoring search params from grid after update

Johan Solve-2
In reply to this post by Rick Draper
Storing search parameters in a session variable is easy with knop, just store the updatefields array, and to refill the form use loadfields with the session var as parameter (a pair array can be used as input for loadfields). You can also store the entire search form variable.

A downside with using a session var is that searches can be a bit sticky, so make sure to reset the session var when suitable.

At 17.39 +0000 2011-07-14, Rick Draper wrote:

>Hi Steve,
>
>There are situations in our use of Knop where we would not want to expose all the search params in the URL, but perhaps putting them into a session variable is the way to go.  Outside Knop, we have used a technique for may years where we store the last SQL query made by an operator in the session table and give them a quick link called "Last Search" on most pages.. that we if they need to head off and do something else they can come back to the very page/search results on which they left.
>
>Very best regards,
>
>
>Rick
>
>
>-----Original Message-----
>From: Knop Framework Discussion [mailto:[hidden email]] On Behalf Of stevepiercy
>Sent: Thursday, 14 July 2011 10:06 PM
>To: Knop Framework Discussion
>Subject: Re: Restoring search params from grid after update
>
>I think I found a solution to this problem.
>
>var('f')=knop_form(
> -database=$d,
> -formaction=($nav->url(-path='mypath')+'?'+client_getargs), // real URL path
> -method='post',
> -actionpath='mypath/edit'); // framework action path
>
>Just append to the formaction:
>
>+'?'+client_getargs
>
>In my cursory testing it works. Is it really that simple? Can someone else have a go at it? I'm used to this stuff being so difficult, that I can't believe it would be so simple!
>
>--steve
>
>--
>View this message in context: http://lasso.2283332.n4.nabble.com/Restoring-search-params-from-grid-after-update-tp3262539p3667369.html
>Sent from the Knop Framework Discussion mailing list archive at Nabble.com.
>
>--
>#############################################################
>This message is sent to you because you are subscribed to the mailing list <[hidden email]>.
>To unsubscribe, E-mail to: <[hidden email]> Send administrative queries to  <[hidden email]> List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>Project homepage http://montania.se/projects/knop/ Google Code has the latest downloads at http://code.google.com/p/knop/
>
>
>
>--
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list <[hidden email]>.
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>
>List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>Project homepage http://montania.se/projects/knop/
>Google Code has the latest downloads at http://code.google.com/p/knop/


--
     Johan Sölve    [FSA Member, Lasso Partner]
     Web Application/Lasso/FileMaker Developer
     MONTANIA SOFTWARE & SOLUTIONS
http://www.montania.se   mailto:[hidden email]
 (spam-safe email address, replace '-' with 'a')

--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/