Most voted "advpl" questions
Advpl - Advanced Protheus Language, used in the programming of Protheus, one of the most widely used management software in Latin America
Learn more…40 questions
Sort by count of
-
10
votes1
answer328
viewsHow to analyze the performance impact of a code snippet in ADVPL?
I have the following code in ADVPL: Static Function linhaJson(cTabela, cChave, lVerificaExclusao) local cTipo local xResult local cJson := "{" dbSelectArea("ZX1") ZX1->(dbSetOrder(1))…
-
6
votes2
answers930
viewsRemoval of excess whitespace
How to remove white spaces inside a string? It would be in the sense of removing spaces from a text string, with the exception of simple spaces between words. As the Excel "tidy" function.…
-
5
votes2
answers1116
viewsWhat are the scopes of the variables in the ADVPL and when to use each one?
I am taking a code from a colleague to give maintenance. I find myself with this code here: Static Function Conv2Json(cCpo) Local cRet := "" Local cSeparador := "" aCpo := StrtoKArr(cCpo, ';')…
-
4
votes1
answer380
viewsHow to change the URL in the browser of the Microsiga Totvs app
The default Microsiga Totvs page has its own default browser, which are the settings to allow the user to change the URL ? Only the default browser homepage of the machine used appears,…
-
4
votes2
answers580
viewsHow to create an optional parameter in ADVPL?
In several functions documented by Totvs there are optional parameters. I would like to create an optional parameter in my function, how to do? I’m wanting to make the function updEnvio receive a…
-
4
votes2
answers106
viewsEquality comparison
I’m studying ADVPL and came across two ways to make the equality comparison. There are comparisons made with two signs of equal: if cVar == "Valor" endif But there are also a few cases that I found,…
-
3
votes2
answers308
viewsGenerating reports using Top Connect in Advpl
When we create reports, using the Advpl language, the most practical is to select this data via Top Connect which is a software that interfaces between the application and the DBMS. Create a query…
-
3
votes2
answers658
viewsCopy array in ADVPL
In ADVPL what difference to make: aArray1 := {"A", "B", "C"} aArray2 := aArray1 or aArray2 := aClone(aArray1)
-
3
votes1
answer1116
viewsRead a DBMS Procedure in ADVPL
It is possible to read a DBMS Procedure in ADVPL (TOTVS language) treating the return of a Cursor ? Is there any object ? The bank in question is Oracle. create or replace PACKAGE abc IS TYPE…
-
3
votes1
answer775
viewsHow do you read the ADVPL profiler report?
I recently asked a question about how to analyze the impact of a chunk of code on ADVPL. The big @siga0984 gave a great answer, and even with my little intimacy with Protheus I managed to connect…
-
3
votes2
answers116
viewsIs there anything in ADVPL equivalent to Java lambda function?
I am maintaining an ADVPL project. In it, I have some source files. Among these sources, I have an information miner in the GEO1 file and a communicator of the information mined in the GEO3 file. In…
-
2
votes2
answers1645
viewsHow to Focus on a MVC Component
I have a MVC model 3. After validation of a header field(formfield), set the focus to the grid. How to do this?
-
2
votes4
answers829
viewsCompile-time type checking ADVPL
I am using the ADVPL language at my stage and having many problems with type errors, variable scope, etc. Things in general that, in my view, should be checked at compile time, however I can only…
advplasked 7 years, 6 months ago Gabriel Belini 545 -
2
votes1
answer226
viewsMeaning of . CH in the Clipper and ADVPL languages?
When we use a language like Clipper or ADVPL, we usually use libraries (includes) .CH, I STILL DON’T KNOW WHAT IT MEANS. In C language, these header files have the suffix . H, which means Header…
-
2
votes1
answer408
viewsHow to concatenate one vector into the other elegantly in ADVPL?
I have two number vectors, aBuffer and aCandidato. Depending on a condition (external to the vector), I need aBuffer receive the content of aCandidato to work on it afterwards. aBuffer will be used…
-
2
votes1
answer230
viewsSearch in two-dimensional array
Hello, I took some courses to learn how to program and I have learned advpl, I have learned to search arrays using the function aScan, but now my array is two-dimensional, as I will do the search? I…
-
2
votes2
answers108
viewsDoes the use of the "alias-assignment" '->' operation interfere with the performance of the application?
In the descending languages of Clipper, there is an operator called "the alias. For example, I can take a field of one result set from that operator (example in ADVPL): cSQL += " SELECT " cSQL += "…
-
2
votes1
answer671
viewsSQL save and return Base64 image
I am saving an image in SQL Server using the varbinary field(max). However, when I run the query to return to the front, I can only return by converting the field to sweep. My question is how to…
-
1
votes3
answers315
viewsError: 102 run query via Msexecauto
I have little experience in advpl. I was studying the subject and I have a little problem. I get the erro 102 how much I try to include a registration in the direct client table on Protheus. I tried…
-
1
votes1
answer158
viewsDebugging error on TDS 11.2 (Eclipse) on Linux Mint 18
I configured the debug with the path of smartclient.exe (use via Wine), the build works, only the debug that gives a permission error in java. Iniciando TOTVS Application…
-
1
votes1
answer2004
viewsHow to Update a BD Record using ADVPL
I’m struggling to do something that should be very simple. I created a custom field for a table called SALDO. In my code is made a SELECT to access the records that interest me with an alias TMP.…
advplasked 7 years, 7 months ago Gabriel Belini 545 -
1
votes2
answers349
viewsLoad the contents of one <TD> onto another <TD> ADVPL ASP
I have a doubt in a code that uses advpl(Microsiga Protheus) more HTML. I need in the html part, that the content of a TD be captured at the time of writing, and assigned in another TD. Below is the…
-
1
votes1
answer245
viewsI have a problem loading a field using a function in ADVPL
I need to load the field CK_XLOTE typing the code of the product in the field CK_PRODUTO, I am generating a function to perform this procedure, but it is not returning the lot in the field. Can…
-
1
votes0
answers290
viewsHow to prevent ADVPL’s Httppost from printing the payload in the log file?
I am doing a routine of sending information from Protheus to my system. To send the information, I am using the function HttpPost, and send an update data package. Each request sends, only payload,…
advplasked 6 years, 1 month ago Jefferson Quesado 22,370 -
1
votes1
answer154
viewsIntegration webservice ADVPL x SOAP
I’m developing an integration with a particular city and I’m getting the following feedback when I run by SoapUI. Could someone help me? <s:Envelope…
-
1
votes1
answer597
viewsProblem CORS Angular + Protheus
I’ve looked in some places and I can’t find anything about it, I’d like to know if anyone’s been through it and can help me. I am trying to make a REST request through an Angular application running…
-
1
votes1
answer44
viewsClear field when selecting list
I’m still new in this area of programming and I’m hitting myself to tweak a form. I have a selection to do in a field, where if the user chooses mail, the email field "which is already filled"…
-
1
votes0
answers297
viewsFwtemporarytable
Hi, I’m starting to program now in advpl and I saw that the recommended currently and the use of temperate tables with Fwtemporarytable, however I have some doubts, because I tried to make a code…
advplasked 5 years, 1 month ago Arnon D. Neves 11 -
0
votes3
answers240
viewsHow to read DBF generated in Protheus in Visual Fox Pro?
I ran a DBF in the Protheus and I am having difficulties to open the file in Visual Foxpro, as it does not recognize the file returning the message: dbf file is not a table. Has anyone been there or…
-
0
votes1
answer320
viewsChange default directory of standard (specific) query in ADVPL
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…
advplasked 7 years, 5 months ago Gabriel Belini 545 -
0
votes1
answer1622
viewsSend file using Httppost - ADVPL
I am trying to send an xml file using Httppost. cUrl := "www.test.com" cPostParms := 'mod=Upload' cGetParms:="" cHeadRet := "" aHeadOut := {User-Agent: Mozilla/4.0 (compatible; Protheus…
-
0
votes1
answer189
viewsADVPL - Set focus on an MVC field
I have an entry point in the product register, where I enable the button F12 to call a function when including a product. This function displays a screen (MSDIALOG) with fill facilitator and assigns…
-
0
votes1
answer172
viewsI have this mistake in advpl
I have the image error when I print the sales order on Totvs. But it only presents this error the third time I make the print, I print once ok right, the second time too, now the third time presents…
advplasked 6 years, 3 months ago Junior Guerreiro 617 -
0
votes1
answer223
viewsCreate another page in an advpl report
Good morning.. I’m new to advpl, and I created a budget print. But I’m having a problem and I have no idea how to fix it, and it’s a simple thing, but since I’m new to advpl, I don’t even know how…
-
0
votes0
answers360
viewsFunction that returns Icms St ADVPL
Good morning. I have the function below that returns the ICMS ST value for a field, only the value is returning zeroed. Someone could help me. Thanks. #INCLUDE "protheus.ch" #INCLUDE "rwmake.ch"…
advplasked 6 years, 2 months ago Junior Guerreiro 617 -
0
votes1
answer387
viewsSend xml via POST to API
I need to send an xml via post to an api, but it keeps giving the following error: String could not be parsed as XML It keeps sending a string instead of actually sending XML. The code to create…
-
0
votes2
answers65
viewsReturn user’s company using the matricula
I am developing a web application integrated with Protheus. The issue is that there are several companies registered in Protheus, and I need to know which company/ affiliate the user belongs, and…
advplasked 5 years, 8 months ago Luis Henrique Abeno 83 -
0
votes2
answers60
viewsVerifying time of execution of a call in ADVPL
My VerifyOnServ(nTimeOut), is not always obeying the nTimeOut past, either because of it or the server with which it communicates. So I needed an insistence on his execution nTimeOut Follows the…
-
0
votes1
answer117
viewsQuery validation based field update
I created a source to update a field within a table based on a query validation, ask it works in debug, but for some reason it doesn’t go through the array, and also doesn’t update any record, even…
advplasked 5 years, 8 months ago user106077 -
0
votes2
answers241
viewsProblems with JsonObj:Json_hash
I am new to advpl, and need to create a Hashmap object. I will leave part of my code to see if you can help me. If !empty(cJsonCOT) // Cria o objeto para fazer o parser do Json oJsonObj :=…