Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

custom search query

Questions related to using nuBuilder Forte.
Post Reply
Timo
Posts: 217
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

custom search query

Unread post by Timo »

If I understand the function nuForm() correctly, when the parameter string4 is specified, a where clause is built like
field1 like %searchstring% or field2 like %searchstring% or ...
It would come in handy if you could pass a custom where clause as parameter.
For example, in a browse form I could add two date fields with a filter button and could build queries like
date_field BETWEEN '%date1%' AND '%date2%' .There are endless more examples. This would give much more flexibility.
nuForm() could recognize if hash cookies are used as search string and then add the custom where clause instead of building a like ... or ... like where clause.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: custom search query

Unread post by admin »

Timo,

You can.

You need to put BETWEEN '%date1%' AND '%date2%' in a Hash Cookie - and use that Hash Cookie in the Form's SQL.

https://wiki.nubuilder.cloud/ ... Custom_SQL


Steven
Timo
Posts: 217
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Re: custom search query

Unread post by Timo »

All right, I'll give it a go
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: custom search query

Unread post by admin »

.
Post Reply