Longview from insightsoftware

Using Model Functions
Using Model Functions This topic contains the Longview Application Framework functions you can use in a model. Click the links in the following table for detailed usage and syntax information. For information on using Longview Application Framework functions in a procedure, see Using Procedure functions. Abs IsLocked ScheduleExists Allocate IsMaintenanceOn Series And IsMaintenanceU...
Abs
Abs Use this function in an equation to evaluate an expression and to calculate its absolute value. Absolute value is the expression of a number as a positive value, regardless of whether it is actually positive or negative. You may find the Abs function useful for learning the deviation between planned and actual results. For information on using this function in a procedure, see Abs. Synt...
Allocate
Allocate Use this function in an equation to allocate a proportional set of values across another symbol. Note: Only those symbols to which the user has access will be included in the allocation. You can specify allocations in the dimension specified in a By statement (for example, By TIMEPER). Syntax: Allocate (IntersectSym, PatternSym[, PatternSourceSym][, Precision[, PlugSymName]]) whe...
And
And See Operators (arithmetic).
Attribute
Attribute Use this function to determine whether the specified attribute exists in the database. A return value of 1 means the attribute exists in the system; a value of 0 means that it does not. Note: If you create a variable to store the return value for this function, you must create the variable with the NUM type. Syntax: ATTRIBUTEEXISTS ("AttrClass", "AttrName") where: AttrClass is th...
AttributeFilter (CalculationBlock)
AttributeFilter (CalculationBlock) You can use an AttributeFilter to limit the effect of a calculation to symbols that meet the filter condition. Within a model, an AttributeFilter is embedded in a CalculationBlock, does not use the function keyword, and uses left braces as delimiters ( { ) containing the filter settings. Attribute filters can be used as AND or OR expressions. Attribute fil...
Avg
Avg Use this function in an equation to calculate the average value of a set of numbers. Syntax: AVG (SymName[Structure], SymName[Structure]) where: Each SymName is a symbol, a series of symbols, or a range of symbols in the dimension specified in a CalculationBlock statement, whose total value you want to average. Structure is a range of symbols. Note: To specify a range of symbols...
BaseValue
BaseValue Use this function in an equation to find the first value for a symbol in a range, in the dimension specified in the By statement. For information on By, see By. You can use the BaseValue function by itself to copy the first value into all the corresponding cells of another symbol in the calculation dimension. You can also use the BaseValue function to produce a value for use by an...
By
By Use this function to specify the dimension through which calculations are performed. Normally, when doing a row calculation, your system calculates the values of the first row symbol in all columns and on all pages. Then it moves to the next row calculation, and proceeds in the same way; however, you may want to change the order of calculation so that your system does row calculations in...
CalculationBlock
CalculationBlock Use this function to define the DataArea to which subsequent calculations must be applied. A CalculationBlock statement stays in effect until you end the CalculationBlock. A CalculationBlock statement applies only while you run the document in which it appears. After creating the CalculationBlock statement, you can use range functions to further limit the calculation to th...
Call
Call Use this function in Longview Application Framework to run a Subroutine Document from a Model Document. Use a Subroutine Document to avoid repeating common calculations in multiple Longview documents. You can also create a subroutine when you have to create a complex calculation. Syntax: CALL "Subroutine";ListPassedSyms;ListConstants;ListReturnSyms where: "Subroutine" is a Subroutin...
Count
Count Use this Longview Application Framework command to return the number of items in a list. This command can be used with either a list variable or a symbol. Note: Only those symbols to which the user has access will be included in the return list. Syntax: COUNT (Variable) COUNT ("DimName","SymName#") COUNT (Schedule,"DimName","SymName#") where: Variable is the name of a variable. "...
Depr
Depr Use this function to calculate depreciation amounts. Syntax: DEPR ("DB", Source, Rate/Life, "Compute"[, OpeningBalance], [Salvage]) where: Source is a symbol or value representing the value of the asset being depreciated. Rate is either a number expressed as a percentage or number of periods. This must be a number between 0 and 1. Compute indicates whether the period (PD) or ye...
Exp
Exp Use this function in an equation to raise a base value to an exponential power. Syntax: EXP (SymName|Structure[,SymName|Structure]) where: SymName is a symbol name containing numeric values, in the dimension specified in a CalculationBlock statement. Structure is a range of symbols. To specify a range of symbols, enter the first and last symbols in the range, separated by a colon. ...
FileExists
FileExists Use this function to determine whether the specified file exists in the specified directory. A return value of 1 means the file exists in the specified directory; a value of 0 means it does not. Note: If you create a variable to store the return value for this function, you must create the variable with the NUM type. Syntax: FileExists("FileName") where: FileName is the name of ...
Filter
Filter Use this function to filter the symbols affected by a calculation. A FILTER statement is similar to a WHEN statement, except that the filtering is not confined to the calculation block. Use this function to: specify a DataArea in which to check the filtering condition identify condition using operators state an operation when the condition is evaluated to TRUE allow for filtering con...
FValue
FValue Use this function in an equation to calculate the future value of a payment, or series of payments, at a given future date when compounded by a given interest rate. Syntax FVALUE OpeningSymName, AddSymName, Rate, IncreaseSymName, NumPeriods where: OpeningSymName is a symbol in the dimension specified in a CalculationBlock statement, representing the original value of the investme...
GetDate
GetDate Use this function to store the current date, in calendar format, in a symbol. You can use Julian date functions to convert the date to a serial number that can be used in calculations. You may find this function useful for keeping track of System Events. Syntax: GETDATE(["Format"]) where: Format is the formula for another method of returning a date, such as “dd/mm/yyyy”. This enab...
GetLockComment
GetLockComment Use this function to retrieve the comment associated with a particular lock. A lock is a Longview database security feature preventing access to data currently used by another user. Syntax: GETLOCKCOMMENT("dataspec.lvdsp") where: dataspec.lvdsp is the name of the DataSpec file. Syntax example: CREATE VARIABLE TXT as string SET VARIABLE TXT = GETLOCKCOMMENT("Tax_Data.lvds...
GetLockUser
GetLockUser Use this function to retrieve the name of the user who created a particular lock. A lock is a Longview database security feature preventing access to data currently used by another user. Syntax: GETLOCKUSER("dataspec.lvdsp") where: dataspec.lvdsp is the name of the DataSpec file. Syntax example: CREATE VARIABLE TXT as string SET VARIABLE TXT = GETLOCKUSER("Tax_Data.lvdsp") ...
GetStatus
GetStatus You can use this function to obtain the status of various server features, such as eliminations, journal entries, schedules, and so on. These features are specified as either TRUE (activated) or FALSE (deactivated) in the Server configuration file (lvsrvr.cfg). When the server is started, it consults this file and turns these features on or off accordingly. This function is usef...
GetTime
GetTime Use this function to get the current time. You may find this function useful for keeping track of System Events. By default, the time appears in the format hh:mm:ss, if no other format is specified. Syntax: GETTIME (["Format"]) where: Format is the formula for another method of returning a timestamp, such as “mm:ss:hh”. If this parameter is not specified, time appears in the defa...
GroupExists
GroupExists Use this function to determine whether the specified group exists in the database. A return value of 1 means the group exists; a value of 0 means it does not. Note: If you create a variable to store the return value for this function, you must create the variable with the NUM type. Syntax: GROUPEXISTS("Group") where: Group is the name of the group to search for. Syntax example:...
Grow
Grow Use this function to grow a series of values by a fixed amount. Each successive value is calculated as follows: Value1 Value2 Value3 Value4 Open Open _ addition open + 2 * addition open + 3 * addition This function must be used with the BY function. The BY function determines the dimension in which the successive values are calculated. Syntax: GROW(OpenValue Addition [, Perio...
Growth
Growth Use this function to calculate the growth rate percentage of a series of values. For each symbol in the BY dimension, growth is calculated as: [(symbolvalue1 - symbolvalue2) / symbolvalue1(-1)] "*" 100 Consider the following two examples of symbol values and the resulting calculated growth rate percentages: SymbolValue1 SymbolValue2 Growth Rate Percentage 100 95 -5 95 112 17...
If
If Use this function to carry out a set of instructions if a condition is TRUE. Do not confuse the If function with the When function: Function Description If To carry out a set of instructions if any value of a symbol matches a condition. When To carry out a set of instructions each time the contents of a cell match a condition. Syntax: IF Condition Instructions [ELSE Instru...
IRR
IRR Use this function to calculate the internal rate of return (the rate that sets the NPV of cash flows to 0) or a series of cash flows. For each period, net inflow = inflow - outflow (outflow is expected to be a positive value). IRR must be used in conjunction with the BY function. The symbols in the BY dimension hold the series of values. The result of IRR is stored in the first symbol in...
IsAreaBatchStatus
IsAreaBatchStatus Use this function to retrieve whether the specified status for batches that impact data in a specified data area is TRUE or FALSE. If the specified status for batches that impact data in a specified data area is TRUE, this function returns a value of 1. If the specified status for batches that impact data in a specified data area is FALSE, this function returns a value of 0...
IsAreaEventStatus
IsAreaEventStatus Use this function to retrieve whether the specified status for events that were triggered by data in a specified data area is TRUE or FALSE. If the specified status for events that were triggered by data in a specified data area is TRUE, this function returns a value of 1. If the specified status for events that were triggered by data in a specified data area is FALSE, this...
IsChanged
IsChanged Use this function to determine whether the data area has been modified since the initial download. This function can be useful if you want to prompt users to save their changes before closing a Data Grid. A return value of 0 indicates that the data area is unchanged, while a value of 1 indicates a modification. Syntax: ISCHANGED(DataArea) where: DataArea is the name of the data a...
First Page
Back
For an optimal Community experience, Please view on Desktop