Edu Posted February 10, 2014 Report Share Posted February 10, 2014 Boa tarde, Tem algum jeito de fazer uma pesquisa incremental no xbrowse com array, digitando através de um get? Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 10, 2014 Report Share Posted February 10, 2014 Veja se ajuda: http://fivewin.com.br/index.php?/topic/21048-pesquisa-dinamica-resolvido/ http://forums.fivetechsupport.com/viewtopic.php?f=6&t=21374&start=0&hilit=busqueda+en+xbrowse+de+un+array Quote Link to comment Share on other sites More sharing options...
Edu Posted February 11, 2014 Author Report Share Posted February 11, 2014 Resolvido! Obrigado. Quote Link to comment Share on other sites More sharing options...
Theotokos Posted October 17, 2016 Report Share Posted October 17, 2016 Bom Dia EDU!!! Como vc resolveu a pesquisa com Array? Quote Link to comment Share on other sites More sharing options...
Edu Posted October 17, 2016 Author Report Share Posted October 17, 2016 Boa tarde amigo! Fiz assim: // GET de pesquisa REDEFINE GET opesquisa VAR var_pesquisa ID 40 OF oDlg UPDATE ; ON CHANGE( ::Assign(), SetPosXbr(var_pesquisa,2,oLbx1) ) ******************************************************************************** FUNCTION SetPosXbr(Digitado, xPos, oLbx1) * Funcao de pesquisa sensitiva no xBrowse com Array LOCAL nPalavra:= UPPER(ALLTRIM(Digitado)) nPos := ASCAN(aPrinProd ,{|X| IF(nPalavra $ Substr(X[xPos], 1, LEN(nPalavra)) , .T. , .F. )}) IF nPos > 0 oLbx1:nArrayAt:= nPos ENDIF oLbx1:UPDATE() oLbx1:REFRESH() RETURN .T. Theotokos 1 Quote Link to comment Share on other sites More sharing options...
Theotokos Posted October 17, 2016 Report Share Posted October 17, 2016 Vlw!!! Obgdão!!! Quote Link to comment Share on other sites More sharing options...
Edu Posted March 16, 2017 Author Report Share Posted March 16, 2017 Melhorias da função: FUNCTION SetPosXbr(Digitado, xPos, oLbx1) * Funcao de pesquisa sensitiva no xBrowse com Array LOCAL nPalavra:= UPPER(ALLTRIM(Digitado)) if Empty(wDigitado) oBrw:Gotop() Return .T. endif if LastKey() == 127 // se foi pressionado backspace oBrw:Skip(-1) Return .T. endif nPos := ASCAN(aPrinProd ,{|X| IF(nPalavra $ Substr(X[xPos], 1, LEN(nPalavra)) , .T. , .F. )}) IF nPos > 0 oLbx1:nArrayAt:= nPos ENDIF oLbx1:Refresh() oLbx1:Update() RETURN .T. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.