NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: wasatchconsulting on June 03, 2013, 01:29:33 PM
-
I have a browse with multiple columns of which there are 4 columns which the user can click on the header and then the user can type in a search parameter in the locator field. This client would like to have it so that instead of clicking on the column headers, one would use a drop box to select which column to search on.
Thanks
Ken Watts
Wasatch Consulting Services
Using Clarion 8 with Nettalk 7
-
Hi Ken,
If you start with a form (memory) you can add a browse control + you can add any other fields like a drop box etc to filter/sort the browse. There is an example (can't remember which one) that demonstrates this but also let you change search type on the fly from startswith to contains etc via radio buttons.
Cheers,
Kev
-
Hi Ken,
You need to drag your client kicking and screaming into the 1990's :)
But of course they want what they want. And yes I think you can do it.
You don't mention how many browses he wants this on, but hopefully it's not too many.
Kevin is right - there are a couple of examples which you'll want to refernece - one is called DropFilter and the other is Locators.
The basic idea is that you create a Form, put whatever controls you like on the form (in this case a drop list) and also put the browse on the form. Then set it so when the drop-list changes, the browse refreshes.
Now you're using the drop to adjust the browse sort, and that is a bit unusual, but do-able. In the browse procedure, go to the
SetVOrder Routine
and in the embed point at the top of that routine you want to set the variable
loc:vOrderNumber
based on the value in the dropdown.
For example, let's say the dropdown variable is called "mem:sortorder".
then your code might be
case p_web.GetSessionValue('mem:sortorder')
of 'name'
loc:vOrderNumber = 1
end
and so on.
take a look at the code in that routine and you'll see what I mean.
cheers
Bruce
-
Kevin and Bruce,
Thanks for you help. This put me in the right direction and I have it working now.
Ken Watts
Wasatch Consulting Services