BtServer:SetFilter()

 

<< Click to Display Table of Contents >>

Navigation:  Server Classes > BtServer Class >

 

BtServer:SetFilter()

 

Previous pageReturn to chapter overviewNext page

 

Purpose

 

 

Method to set a filter on the server

 

 

 

Prototype

 

 

METHOD SetFilter (  cbFilter, cFilterText  )  CLASS BtServer

 

 

 

Argument(s)

 

 

<cbFilter>                a string or codeblock represeting the filter expression

<cFilterText>                a string representing the filter expressino

 

 

 

 

Return

 

 

LOGIC                Was the filter set succesfully

 

 

 

Description

 

 

A string or a codeblock can be passed as the first parameter to set a filter on the server. If the first parameter is a codeblock, the second parameter can be the string representation of that codeblock. When the filter expression is evaluated the server object will be passed as a parameter to the expression. This allows you to access the server in your filter expression to determine which records are accessible. For example, your code block might look something like this:  |oEmp| oEmp:salary > 100000

 

If you pass the filter as a string, and want to make references to the server object in the string, you should use the name 'oServer' in the string, for example: oEmp:SetFilter("oServer:Salary >= 100000")

 

 

 

 

See Also

 

 

BtServer, BtServer:Filter, BtTable:SetFilter()