Change default directory of standard (specific) query in ADVPL

Asked

Viewed 320 times

0

I am trying to create a specific default query where when the user opens the query the path is already filled with a specific directory defined by me. Today when he opens the directory it is always "SERVER\", as can be seen in the figure below inserir a descrição da imagem aqui

I would like to be able to select a specific directory to be opened for example: "PASTA1 PASTA2 SERVER"

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

  • Table: SX5=Tables
  • Expression: Admpath()
  • Return: Admarq()

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

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 Standard Query (RE Query).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.