In this topic we will look at some examples of using GetFormValue function.
Getting Value of Object from PANTHEON Window
In the first example we will write down the expression that returns the warehouse on the invoices issued that can be found in Pantheon in menu in Goods | Invoices Issued Report | Invoices Issued Report/Profit Margin. The name of the window is 'PrometObracunIzdRac', the name of check box in which we select the warehouse is 'fWarehouse'.
[GetFormValue('PrometObracunIzdRac.fWarehouse')]
Getting Value from Window with Document
The names of some document windows are composed of a base and a suffix representing the type of document. If we want to print the referent on the issue, we write down the term
[GetFormValue('PrometIzdDob3000.fReferentZap')]
It will returns value only in the case of document type 3000. In order to return value for all document types, we have to rewrite this code to
[GetFormValue('PrometIzdDob'+<tbLookPoslDog."acDocType">+'.fReferentZap')]
Where dataset "tbLookPoslDog" is not available, we can get the name of the window from the document number. On sale orders we write:
[IIF(Copy(<qReportIzpisD."acKeyView">,Pos('-',
<qReportIzpisD."acKeyView">)+4,1) ='-',
GetFormValue('Naroc'+Copy(<qReportIzpisD."acKeyView">,Pos('-',
<qReportIzpisD."acKeyView">)+1,3)+'0.fReferentZap'),
GetFormValue('Naroc'+Copy(<qReportIzpisD."acKeyView">,Pos('-',
<qReportIzpisD."acKeyView">)+1,4)+'.fReferentZap'))]