Using Procedure Functions
Using Procedure FunctionsThis section contains the Longview Application Framework functions you can use in a procedure. Click the links in the following table for detailed usage and syntax information.For information on using Longview Application Framework functions in a model, see Using Model functions.AbsGetSymbolCreatedTimeStampIsMaintenanceUserSetDataTableCellAttributeExistsGetSymbolDescrip...
Abs
AbsUse 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.CopySyntaxABS (Expression|Value) where: Each Expression is a mathema...
AttributeExists
AttributeExistsUse 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.CopySyntaxATTRIBUTEEXISTS ("AttrClass", "AttrName") where:AttrClass is the attribute class that contains the attribute to search for.AttrName is the name of the attribute.CopySyntax exampleA...
Avg
Avg Use this function in an equation to calculate the average value of a set of numbers.For information on using this function in a model, see Avg. CopySyntaxAVG (Value|Expression[,Value|Expression]) where: Value is a quoted string or an expression that resolves to a string.Expression is a data intersection to be resolved as a text string. If no expression is provided, the current symbol...
Count
CountUse this command to return the number of items in a list. This command can be used with either a list variable, symbol, or a file name.Note: Only those symbols to which the user has access will be included in the return list.CopySyntaxCOUNT (Variable)COUNT ("DimName", "SymName#")COUNT ("ScheduleName", "DimName", "SymName#") COUNT ("FileName") where:"Variable" is the name of a...
CreateList
CreateListUse this Longview Application Framework function to return a list of item names to a list variable.The CreateList function requires the use of Set Variable List to define the variable to which the function will be returning data. See the syntax examples below.SyntaxThe CreateList function can return a list of any of the following items:List itemDescriptionAttributesAll Attributes of a...
Exp
Exp Use this function in an equation to raise a base value to an exponential power.For information on using this function in a model, see Exp.CopySyntaxEXP (Base, Power) (values only)EXP (Power) (calculated as e^power) where: Base is a symbol or a constant. The default is the natural logarithm, e (= 2.71828). If Base is a symbol, your system determines the logarithm for each cell in SymN...
FileExists
FileExistsUse this function to determine whether the specified file exists in the specified directory. CopySyntaxFileExists("FileName") where: FileName is the name of the file, including the extension, to search for. In batch mode, the file name must be relative to the current directory. For Longview Smart Client, the file name must be relative to the working directory. You can also spec...
FilterList
FilterListUse this function to create a new list which is filtered in a specified condition. This function is only available in a procedure as part of the SET VARIABLE command.CopySyntaxFILTERLIST ("VariableName", "Condition") where: VariableName is the name of a list variable.Condition is a condition that evaluates to a TRUE/FALSE (1/0) result. It can also be an Attribute-based filter (...
GetAppConfig
GetAppConfigUse this function to retrieve an app property value from a simple XML element in the .lvapp file, then return the value as a string. This function is specific to Longview Apps. Currently, retrieving nested elements such as <kars> is not supported. Note: You cannot use the GetAppConfig function when running in batch mode.CopySyntaxGetAppConfig ("NameOfProperty") where:NameOfPr...
GetAttributeDescription
GetAttributeDescriptionUse this function to return the description of the specified attribute. The description is returned as a string. CopySyntaxGetAttributeDescription( "AttrClass", "AttrName" [, "LanguageCode"]) where:AttrClass is the Attribute class. Select from the following:AttrClassDescriptionSYSTEMDescribes the entire system at the highest level. Attributes of this Attribute cla...
GetAttributeType
GetAttributeTypeUse this function to identify the attribute value type of a specified attribute. The type is returned as a string. Possible return values include the following:DATEDOUBLEINTEGERSTRINGSYMBOLDATELISTDOUBLELISTINTEGERLISTSTRINGLISTSYMBOLLISTCopySyntaxGetAttributeType( "AttrClass", "AttrName" ) where:AttrClass is the Attribute class. Select from the following:AttrClassDescri...
GetCalcJEStatus
GetCalcJEStatusUse this function to retrieve the status of a calculated journal entry. The variable type is returned as a Num.Possible return values include the following:0 - Does Not Exist - The calculated journal entry does not exist or cannot be retrieved. Non-shared calculated journal entries will not be retrieved for a user that does not have access to the JE.1 - No Status - The calculated...
GetDataTableColumnIndex
GetDataTableColumnIndexUse this function to retrieve the column index of a specified column in a DataTable object. If the column specified does not exist, the return result is -1.CopySyntaxGetDataTableColumnIndex (DataTableName, "ColumnName") where:DataTableName is the name of the DataTable object in which to get the column index.ColumnName is the name of the column for which to get the ...
GetDataTableRow
GetDataTableRowUse this function to retrieve the row contents in a DataTable object. The row to retrieve is specified by the row index.CopySyntaxGetDataTableRow (DataTableName, RowIndex) where:DataTableName is the name of the DataTable object in which to get the row.RowIndex is the row index of the cell to get.CopySyntax exampleCreate Variable EmpDetails[ ] as STRINGCreate Variable RowIn...
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.CopySyntaxGETDATE(["Format"]) where: Format is the formula for another method of returning a date, such as “dd/mm/yyyy”. This en...
GetDocumentSize
GetDocumentSizeUse this function to return the document size in memory. The document must be loaded into memory, and saved if contents have been modified, when this function is called. The size of a text file in memory is not necessarily the same size as on a file system. If you require the size of a document on the file system, use the function GetFileSize. The GetDocumentSize function is usef...
GetFileSize
GetFileSizeUse this function to return the file size on the local accessible file system. This function must be called after the SAVE command. CopySyntaxGETFILESIZE("FileName") where: FileName is the name of binary file enclosed in quotes.CopySyntax exampleSet Variable size = GetFileSize("abc.txt")
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. CopySyntaxGETLOCKCOMMENT("dataspec.lvdsp") where:dataspec.lvdsp is the name of the DataSpec file.CopySyntax exampleCREATE VARIABLE TXT as stringSET VARIABLE TXT = GETLOCKCOMMENT("Tax_Data.lvdsp"...
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 individual. CopySyntaxGETLOCKUSER("dataspec.lvdsp") where:dataspec.lvdsp is the name of the DataSpec file.CopySyntax exampleCREATE VARIABLE TXT as stringSET VARIABLE TXT = GETLOCKUSER("Tax_Data.lvds...
GetMaintenanceUser
GetMaintenanceUserUse this command to return the ID of the user who currently has maintenance on for the system. CopySyntaxGETMAINTENANCEUSER() You can use this command with the Set Variable command to retrieve the user ID and description to variables. CopyExampleSet VARIABLE userIDmtce = GETMAINTENANCEUSER()Set VARIABLE userDesc = [[USER, DESCRIPTION, $userIDmtce$]]
GetNextPeriod
GetNextPeriodUse this function to return the next symbol in the hierarchy which is a sibling of the specified symbol (if symbol is the last symbol, a blank is returned) in the time periods dimension. CopySyntaxGETNEXTPERIOD(SymName) where: SymName is the name of a symbol in the time periods dimension. The symbol must be a descendent of a symbol specified in either the SGPTimePerActivity ...
GetOpenPeriod
GetOpenPeriodUse this function to return the open period symbol for the year. The function determines the root symbol for the symbol designated by either the SGPTimePerActivity or SGPTimePerYTD attributes, and then returns the symbol whose attribute ZFXTimePerOpenList contains that root symbol. If an open period cannot be found, the function returns a blank. For more information on attributes, ...
GetPreviousPeriod
GetPreviousPeriodUse this function to return the previous symbol in the hierarchy which is a sibling of the specified symbol (if SymName is the first symbol, then a blank is returned). CopySyntaxGETPREVIOUSPERIOD(SymName) where: SymName is the name of a symbol in the time periods dimension. The symbol must be a descendent of a symbol specified in either the SGPTimePerActivity or SGPTimeP...
GetResourceString
GetResourceStringUse this function to retrieve resource strings from a resource bundle residing on the Longview Data Server. The resource bundle must be loaded into memory before using this token.You may find this function useful when creating Longview Apps that need to be supported for multiple languages. The language and culture of the operating system (OS), along with the name of the resourc...
GetServerWarning
GetServerWarningUse this function to retrieve “Server has encountered errors” message if the servers have encountered errors due to a failed restatement or other server related errors. If no errors exist, then nothing will be returned. Note: For more information on Server warnings, see the Longview Server Manager Guide.CopySyntaxGetServerWarning() CopySyntax exampleCREATE VARIABLE X AS ...
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 switches these features on or off accordingly. This function is useful ...
GetSymbolBalanceType
GetSymbolBalanceTypeUse this function to return the balance type of the specified symbol. The balance type is returned as a string. Review the following table for a summary of possible return values and their corresponding status.Return ValueDescriptionCREDITThe symbol has a credit balance type.DEBITThe symbol has a debit balance type.NEITHERThe symbol has neither a credit or debit balance type...
GetSymbolCreatedTimeStamp
GetSymbolCreatedTimeStampUse this function to return the created time stamp of the specified symbol. The description is returned as a string in this format "YYYY-MM-DD hh:mm:ss".CopySyntaxGetSymbolCreatedTimeStamp("dimension", "symName") where:dimension is the name of the dimension that contains the symbol.symName is the name of the symbol whose created time stamp is to be retrieved.Copy...
GetSymbolDescription
GetSymbolDescriptionUse this function to return the description of the specified symbol. The description is returned as a string.CopySyntaxGetSymbolDescription( "dimension", "symName"[, "languageCode"]) where:dimension is the name of the dimension that contains the symbol.symName is the name of the symbol whose description is to be retrieved.languageCode is the is the optional language ...