Edu Posted March 21, 2014 Report Share Posted March 21, 2014 Bom dia amigos! Estou tentando fazer uma pesquisa sensitiva no xBrowse com array digitando num GET o conteúdo da pesquisa. Já procurei nas postagens antigas mas ainda não consegui solucionar. Se alguém puder me ajudar ficarei grato. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 21, 2014 Report Share Posted March 21, 2014 http://forums.fivetechsupport.com/viewtopic.php?f=6&t=21374&p=113601&hilit=busqueda+en+xbrowse+de+un+array#p113601 http://forums.fivetechsupport.com/viewtopic.php?f=6&t=20980&p=111485&hilit=busqueda+en+xbrowse+de+un+array#p111485 Quote Link to comment Share on other sites More sharing options...
Edu Posted March 21, 2014 Author Report Share Posted March 21, 2014 Obrigado pela resposta Kapiaba mas eu resolvi de outro modo. Inclusive eu já tinha visto estes posts, não consegui resolver antes talvez por causa da minha versão do fivewin, que é 8.04. Segue a solução talvez seja do interesse de vocês: * Campo de Pesquisa REDEFINE GET oGet4001 VAR wNomeProduto ID 4001 OF oDlg UPDATE ; ON CHANGE( ::Assign(), PesquisaNoVetorXbr(wNomeProduto,lStbx2) ) ************************************************************************************************************ FUNCTION PesquisaNoVetorXbr(wDigitado, lStbx2) * Pesquisa no vetor e posiciona no xBrowse LOCAL wPalavra:= UPPER(ALLTRIM(wDigitado)) nPos := ASCAN(cProd ,{|X| IF(wPalavra $ Substr(X[1],1,LEN(wPalavra)) , .T. , .F. )}) IF nPos > 0 lStbx2:nArrayAt:= nPos ENDIF lStbx2:Refresh() lStbx2:Update() RETURN .T. ********************************************************************************************* Quote Link to comment Share on other sites More sharing options...
Luiz Arruda (ICO) Posted April 22, 2014 Report Share Posted April 22, 2014 Eu faço com um say/get transparente que peguei aqui no forum a muitos anos quando iniciei com xBrowse e até hoje funciona Local cPegaEmpresa:=Space(20) Redefine Say/get oSay VAR cPegaempresa ID 4001 OF oDlg PICTURE "@!" oSay:SetColor(CLR_LGREEN) // ********************************************************************************************* FUNCTION PSeek( c, _cPegaEmpresa, _oGet, _oBrw )local nkey_cPesquisa := AllTrim( c )DbSeek( Upper( c ) )IF !Found()TONE(2000, 2)c := Substr(c, 1, Len( c ) - 1)DbSeek( Upper( c ), .t. )RETURN(.F.)ENDIF_oGet:Varput©_oGet:Refresh()Return(.t.) Rápido e certeiro, veja o "P" na frente da palavra "Digite" e ao ir entrando com letras ele vai posicionando no nome Abraços.. 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.