SetMultiLangDescription
You can use this function for Optiva Workflows, and Copy Methods.
Purpose
The function SetMultiLangDescription allows workflow users to update multi lang description(s) for header and detail fields.
Return Value
If the code is successful, the function displays a value zero (0) and minus one (-1) if there is an error.
Syntax
void SetMultiLangDescription(string sourceSymbol, string sourceSymbolCode, string languageCode, string sourceField, string sourceFieldValue)
Arguments
| Part | Description |
|---|---|
sourceSymbol |
The current object is indicated by empty quotation marks. |
sourceSymbolCode |
The current object of the workflow can be indicated using empty quotation marks. |
languageCode |
The Detail code (DTLCODE) of the tab/section in which multi language column is displayed. |
sourceField |
The field for which the multi-language value is updated. |
sourceFieldValue |
The multi-language value with which the fields are to be updated. |
SetMultiLangDescription("", "", "FR-FR", "DESCRIPTION", "FR-FR description updated using SetMultiLangDescription");
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
void SetMultiLangDescription(string sourceSymbol, string sourceSymbolCode, string sourceFieldsandValues);
Arguments
| Part | Description |
|---|---|
sourceSymbol |
The current object is indicated by empty quotation marks. |
sourceSymbolCode |
The current object of the workflow can be indicated using empty quotation marks. |
languageCode |
The Detail code (DTLCODE) of the tab/section in which multi language column is displayed. |
sourceField |
The field for which the multi-language value is updated. |
sourceFieldValue |
The multi-language value with which the fields are to be updated. |
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
void SetMultiLangDescription(string sourceSymbol, string sourceSymbolCode, string dtlCode, string languageCode, int sourceLineId, string sourceField, string sourceFieldValue)
Arguments
| Part | Description |
|---|---|
sourceSymbol |
The current object is indicated by empty quotation marks. |
sourceSymbolCode |
The current object of the workflow can be indicated using empty quotation marks. |
dtlCode |
The Detail code (DTLCODE) of the tab/section in which multi language column is displayed. |
languageCode |
The language code for which the multi-language value of the field is updated. |
sourceLineId |
The LineId of the row for which the multi-language is to be updated. |
sourceField |
The field for which the multi-language value is updated. |
sourceFieldValue |
The Multi-Language value with which the fields are to be updated. |
This example updates the multi-lang description for Line id 1 in the Steps table of Action set SFTEST1
SetMultiLangDescription("ACTIONSET", "SFTEST1", "LINE", "FR-FR", 1, "DESCRIPTION", "FR-FR description");
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
void SetMultiLangDescription(string sourceSymbol, string sourceSymbolCode, string dtlCode, Dictionary<int, MultiLangData[]> dtlLangData)
Arguments
| Part | Description |
|---|---|
sourceSymbol |
The current object is indicated by empty quotation marks. |
sourceSymbolCode |
The current object of the workflow can be indicated using empty quotation marks. |
dtlCode |
The Detail code (DTLCODE) of the tab/section in which multi language column is displayed. |
dtlLangData |
The dtlLangDatais a type of dictionary (MultiLangData) which 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)
SetMultiLangDescription("ACTIONSET", "SFTEST1", "LINE", "DESCRIPTION", dtlLangData); dtlLangData
is a dictionary containing data of multiple languages like FR-FR, DE-DE etc.