Change default (default) default query directory in ADVPL

0

I'm trying to create a specific default query where when the user opens the query the path is already populated with a specific directory defined by me. Today when it opens the directory is always "SERVER \" , as can be seen in the figure below

Iwouldliketobeabletoselectaspecificdirectorytoopenforexample:"SERVER \ PASTA1 \ PASTA2"

The default query name I'm using now is "DIR". In it the values look like this:

  • Table : SX5 = Tables
  • Expression : AdmPath ()
  • Return : AdmArq ()

Would anyone know how to help? Thank you very much.

    
asked by anonymous 11.07.2017 / 18:51

1 answer

1

You will need to create a custom font:

#include "Protheus.ch"
Static _REResult

User function REFileAdm()
Local cDirInicial := "\PASTA1\PASTA"
Local cMascara := "*.doc"
_REResult :=  cGetFile(cMascara,"Escolha um Arquivo,,cDirInicial)
Return !Empty(_REResult)

User function REFileRet()
Return _REResult

Compiled this RdMake, Create a Specific Pad Query (RE Query).

    
25.07.2017 / 13:20