hi Edgar, i have written some webprompt with sqlfilters, some time it work some time no, i guess it is because the db complexity, i'll share some code that works well ok.
Code:
Object oBANCO_DD is a cBANCOWsDataDictionary
Set pbUseDDSQLFilters to True
Procedure OnConstrain
Integer iRegistros
String sValor sSql
Forward Send OnConstrain
If (IsLoggedIn(ghoWebSessionManager)) Begin
WebGet psValue of oComboAtivo to iRegistros
WebGet psValue of oFormConsulta to sValor
If (iRegistros <> 2) Append sSql "BANCO.ATIVO=" (String(iRegistros))
If (sValor <> "") Begin
Append sSql (If(sSql<>""," AND ",""))
Append sSql " BANCO.DESCRICAO LIKE '%" sValor "%'"
End
Set psSQLFilter to sSql
End
End_Procedure
End_Object
and the list, is just a normal entry_item type:
Code:
Object oPromptList is a cWebPromptlistPrompt
Object oBANCODESCRICAO is a cWebColumn
Entry_Item BANCO.DESCRICAO
Set psCaption to "Descrição"
Set piWidth to 400
End_Object
Object oBANCOCODIGO is a cWebColumn
Entry_Item BANCO.CODIGO
Set psCaption to "Código"
Set piWidth to 152
End_Object
Object oSingleBtnCol is a cWebColumnButton
Set piWidth to 50
End_Object
End_Object
notes:
Code:
Forward Send OnConstrain
i forward send onContrain because on my main datadictionary i'm filtering my tenancy
Code:
If (IsLoggedIn(ghoWebSessionManager)) Begin
when i use a web property (process pooling), i always check if my user is already logged in, to be sure thats webproperty system is ready, and to avoid filtering the data in a initializing state and loss app performance.
so in resume, SqlFilter works well, but you need to figure out what are you doing that make it not work for you.