Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

Resolve

Use this command to resolve tokens within a file. The tokens can resolve to variables, attributes, or values in a data area. The command reads in a specified file and generates a new file, resolving any tokens encountered.

Copy

Syntax

RESOLVE sourceDocName targetDocName [APPEND]                        

where:

  • SourceDocName is the name of the file containing the tokens. It can include a complete or partial folder path in the format C:\...\FileName. If FileName includes spaces, enclose it in double quotation marks; for example:

    "C:\My Documents\My Variable File.txt"

  • targetDocName is the name of the output document.
  • APPEND is optional and adds the output to an existing text file.

Caution: If the named text file already exists and APPEND is not designated, the existing text file will be overwritten and any data stored in it will be lost.

Copy

Syntax example

RESOLVE sourceDocName.xml targetDocName1.xml                 
Copy

Syntax example

RESOLVE sourceDocName2.html targetDocName2.html APPEND                                     

Within the source document, tokens are specified by enclosing the token between two square brackets [[ ]]. The following tokens are supported:

Token Type

Syntax and Description

Variables

[[VARIABLE,VariableName]]

Resolves to the specified variable.

where

  • VariableName is the name of the variable to resolve

Attributes

[[ATTRIBUTE, AttrClass, AttrName, AttrObject]]

Resolves to the specified attribute.

where

  • AttrClass is the Attribute class of the attribute that you wish to resolve.
  • AttrName is the Attribute name of the attribute that you wish to resolve.
  • AttrObject is the Attribute object of the attribute that you wish to resolve.

Base Data

[[DATA, DataAreaName,SymName1,SymName2,.., [Format] ]]

Resolves to the specified data value.

where

  • DataAreaName is the name of the DataArea in which the symbols are found
  • SymName is the name of a symbol for each dimension in the DataArea.
  • Format is an optional parameter to specify the data format of numeric data that is resolved. For example, 10.2 means 10 characters wide, 2 decimal places. The default format, if not specified, is to return the value as stored in the Longview Data Server.

Schedule Data

[[SCHEDDATA,DataAreaName,SymName1,SymName2,...,SchedName, ExtraDimSymName1,ExtraDimSymName2,... [Format] ]]

Resolves to the specified data value.

where

  • DataAreaName is the name of the DataArea in which the symbols are found.
  • SymName is the name of a symbol for each dimension in the DataArea.
  • ExtraDimSymName is the name of a symbol for each schedule dimension in the DataArea.
  • Format is an optional parameter to specify the data format of numeric data that is resolved. For example, 10.2 means 10 characters wide, 2 decimal places. The default format, if not specified, is to return the value as stored in the Longview Data Server.

Include

[[INCLUDE, filename]]

Resolves the specified file and inserts the resolved content into the current file.

where

  • filename is the name of another file to be resolved within the parent document.

Note: *You may nest most tokens but variables cannot be nested within another variable.

Source File Example

The Resolve command can be used to generate xml reports that reference Longview data, attributes, and variables within a procedure.

The following snippet is an example of an xml file that references the supported tokens for the Resolve command:

Copy

CountryByCountryReporting.xml

<?xml version="1.0" encoding="utf-8"?>
<CBC_OECD version=""> 
<MessageSpec> 
<SendingEntityIN>ABC Inc</SendingEntityIN>
<TransmittingCountry>CA</TransmittingCountry> 
[[INCLUDE, XML_Header_RecCountry_Res.xml]]
<MessageType>CBC</MessageType> <!--MessageType_EnumType-->
<Language>EN</Language> <!--LanguageCode_Type*-->
<Warning>[[VARIABLE,warningText]]</Warning> 
<Contact>Free text containing contact information</Contact> 
<MessageRefId>SendersUniqueIdentfierForThisMessage</MessageRefId> 
<MessageTypeIndic>[[VARIABLE,MessageTypeIndic]]</MessageTypeIndic> 
<CorrMessageRefId>
[[DATA,da,MsgRefID,Dim1Set,Dim2Set,Dim3Set,Dim4Set,Dim5Set]]
</CorrMessageRefId> 
<ReportingPeriod>
[[ATTRIBUTE, SYSTEM, ASReportingPer, DBDEFAULT]]
</ReportingPeriod> 
</MessageSpec>
<CbcBody> <!--CbcBody_Type (unbounded)-->                                                        

Published:

Resolve

Use this command to resolve tokens within a file. The tokens can resolve to variables, attributes, or values in a data area. The command reads in a specified file and generates a new file, resolving any tokens encountered.

Copy

Syntax

RESOLVE sourceDocName targetDocName [APPEND]                        

where:

  • SourceDocName is the name of the file containing the tokens. It can include a complete or partial folder path in the format C:\...\FileName. If FileName includes spaces, enclose it in double quotation marks; for example:

    "C:\My Documents\My Variable File.txt"

  • targetDocName is the name of the output document.
  • APPEND is optional and adds the output to an existing text file.

Caution: If the named text file already exists and APPEND is not designated, the existing text file will be overwritten and any data stored in it will be lost.

Copy

Syntax example

RESOLVE sourceDocName.xml targetDocName1.xml                 
Copy

Syntax example

RESOLVE sourceDocName2.html targetDocName2.html APPEND                                     

Within the source document, tokens are specified by enclosing the token between two square brackets [[ ]]. The following tokens are supported:

Token Type

Syntax and Description

Variables

[[VARIABLE,VariableName]]

Resolves to the specified variable.

where

  • VariableName is the name of the variable to resolve

Attributes

[[ATTRIBUTE, AttrClass, AttrName, AttrObject]]

Resolves to the specified attribute.

where

  • AttrClass is the Attribute class of the attribute that you wish to resolve.
  • AttrName is the Attribute name of the attribute that you wish to resolve.
  • AttrObject is the Attribute object of the attribute that you wish to resolve.

Base Data

[[DATA, DataAreaName,SymName1,SymName2,.., [Format] ]]

Resolves to the specified data value.

where

  • DataAreaName is the name of the DataArea in which the symbols are found
  • SymName is the name of a symbol for each dimension in the DataArea.
  • Format is an optional parameter to specify the data format of numeric data that is resolved. For example, 10.2 means 10 characters wide, 2 decimal places. The default format, if not specified, is to return the value as stored in the Longview Data Server.

Schedule Data

[[SCHEDDATA,DataAreaName,SymName1,SymName2,...,SchedName, ExtraDimSymName1,ExtraDimSymName2,... [Format] ]]

Resolves to the specified data value.

where

  • DataAreaName is the name of the DataArea in which the symbols are found.
  • SymName is the name of a symbol for each dimension in the DataArea.
  • ExtraDimSymName is the name of a symbol for each schedule dimension in the DataArea.
  • Format is an optional parameter to specify the data format of numeric data that is resolved. For example, 10.2 means 10 characters wide, 2 decimal places. The default format, if not specified, is to return the value as stored in the Longview Data Server.

Include

[[INCLUDE, filename]]

Resolves the specified file and inserts the resolved content into the current file.

where

  • filename is the name of another file to be resolved within the parent document.

Note: *You may nest most tokens but variables cannot be nested within another variable.

Source File Example

The Resolve command can be used to generate xml reports that reference Longview data, attributes, and variables within a procedure.

The following snippet is an example of an xml file that references the supported tokens for the Resolve command:

Copy

CountryByCountryReporting.xml

<?xml version="1.0" encoding="utf-8"?>
<CBC_OECD version=""> 
<MessageSpec> 
<SendingEntityIN>ABC Inc</SendingEntityIN>
<TransmittingCountry>CA</TransmittingCountry> 
[[INCLUDE, XML_Header_RecCountry_Res.xml]]
<MessageType>CBC</MessageType> <!--MessageType_EnumType-->
<Language>EN</Language> <!--LanguageCode_Type*-->
<Warning>[[VARIABLE,warningText]]</Warning> 
<Contact>Free text containing contact information</Contact> 
<MessageRefId>SendersUniqueIdentfierForThisMessage</MessageRefId> 
<MessageTypeIndic>[[VARIABLE,MessageTypeIndic]]</MessageTypeIndic> 
<CorrMessageRefId>
[[DATA,da,MsgRefID,Dim1Set,Dim2Set,Dim3Set,Dim4Set,Dim5Set]]
</CorrMessageRefId> 
<ReportingPeriod>
[[ATTRIBUTE, SYSTEM, ASReportingPer, DBDEFAULT]]
</ReportingPeriod> 
</MessageSpec>
<CbcBody> <!--CbcBody_Type (unbounded)-->                                                        

For an optimal Community experience, Please view on Desktop