Recuperando o filtro de uma DataWindow

O código abaixo verifica se existe ou não um filtro definido para a DataWindow. Todavia, ele não informa se existem linhas filtradas. Uma das formas de definir o filtro é utilizando a função SetFilter.

Exemplo 01: Utilizando dot-notation.

string ls_filtro

ls_filtro = dw_1.Object.DataWindow.Table.Filter

if ls_filtro <> "" then
    //Existe filtro
else
    //Não existe filtro
end if

Exemplo 02: Utilizando describe.

string ls_filtro

ls_filtro = dw_1.Describe("DataWindow.Table.Filter")

if ls_filtro <> "" then
    //Existe filtro
else
    //Não existe filtro
end if

 

Dúvidas sobre o artigo? Sugestões? Precisa de ajuda com outra funcionalidade do PowerBuilder? Deixe um comentário.

The following two tabs change content below.
Arquiteto de Software e Desenvolvedor Backend (quase Fullstack), geralmente trabalho com C#, PowerShell, Python, Golang, bash e Unity (esse é mais por hobby). Estou sempre buscando algo novo para aprender, adicionando novas ferramentas ao meu cinto de utilidades.
Posted in Dev, PowerBuilder and tagged , , , , , .