how to do a filter?

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

how to do a filter?

#1

Postby t4nu » Fri Jan 15, 2016 3:45 am

Hi,
I have a grid and I want the user can doing a filter to its data. What I mean is something like this:
Say that the grid contains 5 column, I want the user can fill any column and click somekind of button and the data match with what entered in that column are displayed.
What should I do to do that?
I have a little experiences with other programming language and usually all I have to do is create somekind of query on the fly and after execute it bind the result to the grid. I don't have any clue to do it in Ebase.

Thanks in advance for the help.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Mon Jan 18, 2016 9:23 am

The basic idea is to construct the SQL WHERE clause dynamically based on what the user has entered. You will need a table connected to a Database Resource where the SQL statement will be something like:

select * from mytable where &&var1

Then you build the WHERE clause in var1. You might find some examples on this forum.
0 x


Who is online

Users browsing this forum: No registered users and 22 guests