using the method bskip wbrowse
Posted: Fri Oct 25, 2013 6:19 pm
Hello
I have a product search filter option to choose which 1-Products in stock or 2-Products without stock or 3-Wide, tried using SetFilter () was slow network, I can not create indexes fixed or temporary, thought about using the method of bskip browse, but I can not make it work, could someone give me an example?
Follow what I'm doing:
oBrwConsul:bSkip := { | nRecs | SkipEstoq( nRadio, cAlias, nRecs ) }
...
...
...
FUNCTION SkipEstoq( nRadio, cAlias, nRecords )
LOCAL nSkipped
DEFAULT nRecords := 1
IF nRadio == 1
IF (cAlias)->PrEstq <= 0 ; IF( nRecords < 0, nRecords--, nRecords++ ); ENDIF
ELSEIF nRadio == 2
IF (cAlias)->PrEstq > 0 ; IF( nRecords < 0, nRecords--, nRecords++ ) ; ENDIF
ENDIF
nSkipped := (cAlias)->( DbSkipper( nRecords ) )
RETURN nSkipped
I have a product search filter option to choose which 1-Products in stock or 2-Products without stock or 3-Wide, tried using SetFilter () was slow network, I can not create indexes fixed or temporary, thought about using the method of bskip browse, but I can not make it work, could someone give me an example?
Follow what I'm doing:
oBrwConsul:bSkip := { | nRecs | SkipEstoq( nRadio, cAlias, nRecs ) }
...
...
...
FUNCTION SkipEstoq( nRadio, cAlias, nRecords )
LOCAL nSkipped
DEFAULT nRecords := 1
IF nRadio == 1
IF (cAlias)->PrEstq <= 0 ; IF( nRecords < 0, nRecords--, nRecords++ ); ENDIF
ELSEIF nRadio == 2
IF (cAlias)->PrEstq > 0 ; IF( nRecords < 0, nRecords--, nRecords++ ) ; ENDIF
ENDIF
nSkipped := (cAlias)->( DbSkipper( nRecords ) )
RETURN nSkipped