ObjectXml

You can use this function for Optiva Workflows.

Purpose

Returns XML data for an Optiva object.

Syntax


Dim variable As String =ObjectXml(Symbol, KeyStr, Details, languageCodes)

Arguments

Part Type Description
Symbol String Optiva symbol
KeyStr String Object key code
Details String Object details, such as INGR (ingredients) or PARAM (parameters).

languageCodes

String

Optional. Use this parameter to export Enumerated Value Lists in more than one language. Use a semi-colon delimited list to separate each language code.

When you specify “EN-US;FR-FR”, the Enum Val List Labels for English and French are added as nodes to the XML. The node names include the language code in the suffix (i.e., _LABEL_EN-US and _LABEL_FR-FR respectively).

An invalid language code, or a code that does not exist in the database, is added as a node. In this scenario, the English label is retrieved by the system.

If you omit this parameter, leave it blank, or specify Nothing. Then the default suffix of “_LABEL” is used.

Inside each XML file, the Enum Val Lists are displayed in the appropriate language. Enumerated Queries only show the one Description that is retrieved in the Query. Typically, it is the default language of the database.

Description

Sets the object key. It can be different than the key that was used previously. The key or the symbol can be derived or based on data other than that which was in context when the workflow was launched. A workflow can be designed to populate the tag parameters with the master formula for the item and the formula symbol.

One or more description fields are added to the enumerated list values, depending on the value given to the languageCodes parameter.


 <statusind>200</statusind>
 <statusind_label>Approved</statusind_label>

Examples

This action gets values for the current symbol and object. You must start the script with imports System.xml if XML documents are part of it.


Dim sXn2 As String = ObjectXml(objectSymbol, objectKey, "HEADER;PARAM")

This action retrieves the XML for the items in the formula. The XML is retrieved to the constituent level.


Dim sXn2 As String = ObjectXml("FORMULAADJUST", "", "HEADER;INGRMULTIRM")

When you specify “EN-US;FR-FR”, the Enum Val List Labels for English and French are added as nodes to the XML. The node names include the language code in the suffix (i.e., _LABEL_EN-US and _LABEL_FR-FR respectively).


Dim xml As String = ObjectXml("", "", "HEADER;CUSTOM;TPALL", "EN-US;FR-FR")
MessageList(xml)

This example retrieves the current browser language for reporting.

Dim sLanguage as String = Context.SessionInfo.Language
Dim xml As String = ObjectXml("", "", "HEADER;CUSTOM;TPALL", sLanguage)
MessageList(xml)