limiting records read based on selection criteria

What is the best way to limit which records a form displays based on sql where clause?

please explain.. What do you mean with limit?
Limit the maximum records that are shown?

ideally i want to pass an asp session variable into the sql select statement so that i can only select records which match the variable - please explain how to pass in the variable.

rfleming:
What is the best way to limit which records a form displays based on sql where clause?

You can use controller.addFilterParam - this will allow you to automatically add to the “where” clause of the query that displays records. NOTE: Once you add a filter param, you can’t “take it off” again - until you re-open the solution.

Hope this helps,

Bob Cusick

first: getting a asp session variable (that the browser get’s??) is as far as i know not possible right now. Because if you don’t look at the first time install of servoy. (going to a webpage..) but from that time on (so starting servoy from a desktop shortcut) What asp session variable do you have??

But to limit the records shown in a foundset can be done by implementing youre own searches for that form. Or setting foundsetFilterParams with the onload of that form. (xxx=sessionvar)