GUI Related Functions
$$IsLastOfSet
It is used to check if the current Form is the last Form being printed. It doesn’t require any parameter. It returns TRUE, if the current Form is the last Form being printed, else returns FALSE.
Syntax
$$IsLastOfSet
Example
[Line : DSP Vch Explosion]
Next Page : (($$LineNumber = $$LastLineNumber) AND $$IsLastOfSet)
$$BalanceLines
It is used to check the balance number of lines in the repeated lines, including the exploded part lines present, in a given part. Scroll : Vertical must be specified at ‘Part’ definition in order to use this function. This function too does not require any parameter and returns a Numerical value.
Syntax
$$BalanceLines
Example
[Line : AccType Detail]
NextPage : ($$BalanceLine > 0) AND (($$BalanceLines < 5)
Here, if the Balance number of lines is between 0-5, remaining lines will be printed on next page.
$$DoExplosionsfit
In the process of printing, if a line is exploded, then this function can be used to check whether the exploded part fits within the current page. This function also doesn’t require any parameter and returns its logical value. It returns its logical value as YES, if it is True.
Syntax
$$DoExplosionsFit
Example
[Line : EXPSMP InvDetails]
NextPage : NOT $$DoExplosionsFit OR (($$LineNumber = $$LastLineNumber)
$$ExplodeOwner
The function $$ExplodeOwner changes the Interface (Requestor) Object to the Line owning the current exploded Part, and evaluates the given expression, i.e ., Field and Variable Values, in the context of Interface Object.
Syntax
$$ExplodeOwner : <Expression>
Example
[Line : Smp InvEntries]
Fields : Name Field
Local : Field : Name Field : Set As : $StockItemName
Explode : Smp Expl Part
[Part : Smp Expl Part]
Lines : Smp Batch Allocations
Repeat : Smp Batch Allocations : Batch Allocations
Scroll : Vertical
[Line : Smp Batch Allocations]
Fields : Name Field
Local : Field : Name Field : Set As : $$ExplodeOwner:#NameField
In this example, the field NameField is being evaluated in the context of the Line Smp InvEntries, which owns the current exploded part Smp Expl Part.
$$PrevLine
When the line is repeating, we may require evaluating an expression in the context of the previous line. For example, we might require to fetch the field values stored in the previous line for expression in the current line. The function $$PrevLine is used to change the Requestor to the Previous Line for expression evaluation.
Syntax
$$PrevLine : <Expression>
The function $$PrevLine not only changes the Interface (Requestor) Object context, but also changes the Data Object context to the Object associated with the Requestor.
Example
[Line : PrevParticulars]
Explode : PrevParticulars ExpPart : $$PrevLine:#PartyParticulars!=#PartyParticulars
In this example, in case of repeated lines, where subtotals are required to be displayed or printed for the same party, we can explode a subtotal line after comparing the previous line’s and the current line’s Ledgers. If the field values are not the same, then the subtotal line is exploded.