SetMultiLangDescription

You can use this function for Optiva Workflows, and Copy Methods.

Purpose

The purpose is to have a scripting function which can allow workflow users to update multi lang description(s) for header and details fields.

Syntax


SetMultiLangDescription(sourceSymbol, sourceSymbolCode, languageCode, sourceField, sourceFieldValue)

Arguments

Part Description
sourceSymbol The object type of symbol.

Use empty quotation marks to indicate the current symbol for the workflow or the new object for the copy method.

sourceSymbolCode The object code for which context attributes can be added.

Use empty quotation marks to indicate the current object for the workflow or the new object for the copy method.

languageCode The language code for which the multi-language value of the field is updated.
sourceField The field for which the multi-language value is updated.
sourceFieldValue The Multi-Language value.

Description

SetMultiLangDescription is used to update multi language descriptions of a field in header.

This is an example to set the description for the current symbol and current object for a language of FR-FR for Description with FR-FR description updated using SetMultiLangDescription.


SetMultiLangDescription(“”, “”, "FR-FR", "DESCRIPTION", “FR-FR description updated using SetMultiLangDescription”).

Syntax

SetMultiLangDescription(sourceSymbol, sourceSymbolCode, sourceFieldsandValues).

Arguments

Part Description
sourceSymbol The object type of symbol.

Use empty quotation marks to indicate the current symbol for the workflow or the new object for the copy method.

sourceSymbolCode The object code for which context attributes can be added.

Use empty quotation marks to indicate the current object for the workflow or the new object for the copy method.

sourceFieldsandValues

The source fields and values are an array of type Optiva.ScriptProxy.MultiLangData.

MultiLangData contains languageCode, multiLangField, description.

.

Description

SetMultiLangDescription is used to update multi language descriptions for multiple fields and languages in header.

This is an example to set the description for the current symbol and current object for a language of EN-US and FR-FR for Description with respective descriptions.

dim sourceFieldsandValues(1) As Optiva.ScriptProxy.MultiLangData
    
    sourceFieldsandValues(0) = new Optiva.ScriptProxy.MultiLangData()
    sourceFieldsandValues(0).languageCode = "EN-US"
    sourceFieldsandValues(0).multiLangField = "DESCRIPTION"
    sourceFieldsandValues(0).description = “EN-US description updated using SetMultiLangDescription”
    sourceFieldsandValues(1)= new Optiva.ScriptProxy.MultiLangData()
    sourceFieldsandValues(1).languageCode = "FR-FR"
    sourceFieldsandValues(1).multiLangField = "DESCRIPTION"
    sourceFieldsandValues(1).description = “FR-FR description updated using SetMultiLangDescription”
    
    SetMultiLangDescription(“”, “”, sourceFieldsandValues)

Syntax

SetMultiLangDescription(sourceSymbol,sourceSymbolCode, dtlCode,languageCode,sourceLineId, sourceField, sourceFieldValue).

Arguments

Part Description
sourceSymbol The object type of symbol.

Use empty quotation marks to indicate the current symbol for the workflow or the new object for the copy method.

sourceSymbolCode The object code for which context attributes can be added.

Use empty quotation marks to indicate the current object for the workflow or the new object for the copy method.

dtlCode The Detail code of the tab in which multi language column is displayed.
languageCode The language code for which the multi-language value of the given field is updated.
sourceLineId The LineId of the row.
sourceField The field for which the multi-language value is updated.
sourceFieldValue The Multi-Language value.

Description

SetMultiLangDescription is used to update multi language descriptions for a field on the Details tab.

This is an example to set the description for ACTIONSET with set code SFTEST1 in Steps tab.

dim sourceSymbol as string = "ACTIONSET"
dim sourceSymbolCode as string = "SFTEST1"
dim languageCode as string = "EN-US"
dim sourceField as string = "DESCRIPTION"
dim sourceFieldValue as string = "step 1 description"
dim dtlcode as string = "LINE"
dim sourceLineId as int32 = 1
SetMultiLangDescription(sourceSymbol, sourceSymbolCode, dtlCode, languageCode, sourceLineId, sourceField, sourceFieldValue).

Syntax

SetMultiLangDescription(sourceSymbol, sourceSymbolCode, dtlCode, dtlLangData).

Arguments

Part Description
sourceSymbol The object type of symbol.

Use empty quotation marks to indicate the current symbol for the workflow or the new object for the copy method.

sourceSymbolCode The object code for which context attributes can be added.

Use empty quotation marks to indicate the current object for the workflow or the new object for the copy method.

dtlCode The Detail code of the tab in which multi language column is displayed.
dtlLangData

dtlLangData is a type of dictionary.

The Dictionary(Of int32, Optiva.ScriptProxy.MultiLangData()),

MultiLangData contains languageCode, multiLangField , description .

Description

SetMultiLangDescription is used to update multi language descriptions for multiple fields in Details tab.

Examples

This is an example to set the description for ACTIONSET with set code SFTEST1 in Steps tab.

dim sourceSymbol as string = "ACTIONSET"
dim sourceSymbolCode as string = "SFTEST1"
dim dtlLangData As Dictionary(Of int32, Optiva.ScriptProxy.MultiLangData()) = New Dictionary(Of int32, Optiva.ScriptProxy.MultiLangData())dim sourceField as string = "DESCRIPTION"
dim sourceFieldsandValues(1) As Optiva.ScriptProxy.MultiLangData.
sourceFieldsandValues(0) = new Optiva.ScriptProxy.MultiLangData()
sourceFieldsandValues(0).languageCode = "EN-US"
sourceFieldsandValues(0).multiLangField = "DESCRIPTION"
sourceFieldsandValues(0).description = "description in EN-US for row 2"
sourceFieldsandValues(1) = new Optiva.ScriptProxy.MultiLangData()
sourceFieldsandValues(1).languageCode = "FR-FR"
sourceFieldsandValues(1).multiLangField = "DESCRIPTION"
sourceFieldsandValues(1).description = "description in FR-FR for row  2"
dtlLangData.Add(2,sourceFieldsandValues)
dim sourceFieldsandValuesRow3(1) As Optiva.ScriptProxy.MultiLangData
sourceFieldsandValuesRow3(0) = new Optiva.ScriptProxy.MultiLangData()
sourceFieldsandValuesRow3(0).languageCode = "EN-US"
sourceFieldsandValuesRow3(0).multiLangField = "DESCRIPTION"
sourceFieldsandValuesRow3(0).description = "description in EN-US for row 3"
sourceFieldsandValuesRow3(1) = new Optiva.ScriptProxy.MultiLangData()
sourceFieldsandValuesRow3(1).languageCode = "FR-FR"
sourceFieldsandValuesRow3(1).multiLangField = "DESCRIPTION"
sourceFieldsandValuesRow3(1).description = "description in FR-FR for row 3"
dtlLangData.Add(3,sourceFieldsandValuesRow3)
SetMultiLangDescription(sourceSymbol, sourceSymbolCode, dtlCode, dtlLangData)