Mapping Services 3.3.1 DML Users Guide Save PDF Selected topic Selected topic and subtopics All content DML functions: Miscellaneous generateUniqueId isAbsent isNull isNullOrAbsent isObjectAvailableOnServer replaceIfAbsent replaceIfNull replaceIfNullOrAbsent The following Miscellaneous functions are available: generateUniqueId generateUniqueId Comment Description generateUniqueId generates a unique identifier with the specified type. Syntax generateUniqueId (type) Return String Parameter type (String constant): "ALPHA" - The generated identifier is alphanumeric."NUMERIC" - The generated identifier is numeric. Example generateUniqueId("ALPHA") returns 4288945603574814573189143 isAbsent isAbsent Comment Description isAbsent checks an expression for the value absent. Syntax isAbsent(expression) Return Boolean If the value of the expression is: absent, isAbsent returns true. not absent, isAbsent returns false. Parameter expressionEnter an expression from any data class. Example In the following example, isAbsent checks the returnColumn expression for the value absent. If returnColumn does not find the node it is looking for, isAbsent returns a default value. If returnColumn finds the node, the Function returns that node. if isAbsent(returncolumn(CustomerType, CustomerId)) then default_CustomerType else returnColumn(CustomerType, CustomerId) isNull isNull Comment Description isNull checks an expression for the value null. Syntax isNull(expression) Return Boolean If the value of the expression is: null, isNull returns true not null, isNull returns false Parameter expression Enter an expression from any data class. Example The following example tests an input node for the value null. If the returned value is null, then the expression is replaced by a default value. ifisNull(\CustomerTransaction\CustomerType) then default_CustomerType elseCustomerType isNullOrAbsent isNullOrAbsent Comment Description isNullOrAbsent checks an expression for the values null or absent. Syntax isNullOrAbsent(expression) Return Boolean If the value of the expression is: null or absent, isNullOrAbsent returns true not null or absent, isNullOrAbsent returns false Parameter expression Enter an expression from any data class Example The following example tests an input node for the value null or absent. If the returned value is null or absent, then the expression is replaced by a default value. if isNullOrAbsent(\CustomerTransaction\CustomerType) then default_CustomerType else CustomerType isObjectAvailableOnServer isObjectAvailableOnServer Comment Description isObjectAvailableOnServer enables you determine if a specific object (specified by type and name) is deployed on the Map Engine Server. For use in decision path, Map, Validation Rule, Trigger and for the initialization of Variables. Use this function, for example, to determine if a target Flow is deployed on the Mapping Services Server before executing it through Dynamic Flow loading. Syntax isObjectAvailableOnServer(object type,object name>) Return Boolean Returns true if the object is found on the server or false if the object is not found. Parameters object type (string) Enter the type of the object to perform a search. Possible values are: BusinessDocument Function DML Block Table Variable Flow object qualified name (string) Enter the name of the object to perform a search. Enter a name in any of the following formats: Qualified name: Entity.Folder.Name Partial name: Folder.Name Partial name: Name Example isObjectAvailableOnServer("Flow", "MyTransformationStage")Returns trueif the Flow named MyTranformationStage is located on the server, false if it is not found. replaceIfAbsent replaceIfAbsent Comment Description replaceIfAbsent checks an expression for the value absent. If the value of the expression: is absent, replaceIfAbsent replaces the expression with another one is not absent, replaceIfAbsent returns the expression unchanged Syntax replaceIfAbsent(expression, replace_expression) Return replaceIfAbsent returns the same data class as the expression that it checks. It can check expressions of any data class. Parameters expressionEnter an expression from any data class replace_expressionEnter an expression from the same data class as expression Example The following example tests an input node for the value absent. If the returned value is absent, then the expression is replaced by a default value. replaceIfAbsent(CustomerType, default_CustomerType) replaceIfNull replaceIfNull Comment Description replaceIfNull checks an expression for the value null. If the value of the expression: is null, replaceIfNull replaces the expression with another one. is not null, replaceIfNull returns the expression unchanged. Syntax replaceIfNull(expression, replace_expression) Return replaceIfNull returns the same data class as the expression that it checks. It can check expressions of any data class. Parameters expressionEnter an expression from any data class replace_expression Enter an expression from the same data class as expression Example The following example tests an input node for the value null. If the returned value is null, then the expression is replaced by a default value. replaceIfNull(CustomerType, default_CustomerType) replaceIfNullOrAbsent replaceIfNullOrAbsent Comment Description replaceIfNullOrAbsent checks an expression for the values null and absent. If the value of the expression: is null or absent, replaceIfNullOrAbsent replaces the expression with another one. is not null or absent,replaceIfNullOrAbsent returns the expression unchanged. Syntax replaceIfNullOrAbsent(expression, replace_expression) Return replaceIfNullOrAbsent returns the same data class as the expression that it checks. It can check expressions of any data class. Parameters expression Enter an expression from any data class replace_expression Enter an expression from the same data class as expression Example The following example tests an input node for the value null or absent. If the returned value is null or absent, then the expression is replaced by a default value. replaceIfNullOrAbsent(CustomerType, default_CustomerType) Related Links
DML functions: Miscellaneous generateUniqueId isAbsent isNull isNullOrAbsent isObjectAvailableOnServer replaceIfAbsent replaceIfNull replaceIfNullOrAbsent The following Miscellaneous functions are available: generateUniqueId generateUniqueId Comment Description generateUniqueId generates a unique identifier with the specified type. Syntax generateUniqueId (type) Return String Parameter type (String constant): "ALPHA" - The generated identifier is alphanumeric."NUMERIC" - The generated identifier is numeric. Example generateUniqueId("ALPHA") returns 4288945603574814573189143 isAbsent isAbsent Comment Description isAbsent checks an expression for the value absent. Syntax isAbsent(expression) Return Boolean If the value of the expression is: absent, isAbsent returns true. not absent, isAbsent returns false. Parameter expressionEnter an expression from any data class. Example In the following example, isAbsent checks the returnColumn expression for the value absent. If returnColumn does not find the node it is looking for, isAbsent returns a default value. If returnColumn finds the node, the Function returns that node. if isAbsent(returncolumn(CustomerType, CustomerId)) then default_CustomerType else returnColumn(CustomerType, CustomerId) isNull isNull Comment Description isNull checks an expression for the value null. Syntax isNull(expression) Return Boolean If the value of the expression is: null, isNull returns true not null, isNull returns false Parameter expression Enter an expression from any data class. Example The following example tests an input node for the value null. If the returned value is null, then the expression is replaced by a default value. ifisNull(\CustomerTransaction\CustomerType) then default_CustomerType elseCustomerType isNullOrAbsent isNullOrAbsent Comment Description isNullOrAbsent checks an expression for the values null or absent. Syntax isNullOrAbsent(expression) Return Boolean If the value of the expression is: null or absent, isNullOrAbsent returns true not null or absent, isNullOrAbsent returns false Parameter expression Enter an expression from any data class Example The following example tests an input node for the value null or absent. If the returned value is null or absent, then the expression is replaced by a default value. if isNullOrAbsent(\CustomerTransaction\CustomerType) then default_CustomerType else CustomerType isObjectAvailableOnServer isObjectAvailableOnServer Comment Description isObjectAvailableOnServer enables you determine if a specific object (specified by type and name) is deployed on the Map Engine Server. For use in decision path, Map, Validation Rule, Trigger and for the initialization of Variables. Use this function, for example, to determine if a target Flow is deployed on the Mapping Services Server before executing it through Dynamic Flow loading. Syntax isObjectAvailableOnServer(object type,object name>) Return Boolean Returns true if the object is found on the server or false if the object is not found. Parameters object type (string) Enter the type of the object to perform a search. Possible values are: BusinessDocument Function DML Block Table Variable Flow object qualified name (string) Enter the name of the object to perform a search. Enter a name in any of the following formats: Qualified name: Entity.Folder.Name Partial name: Folder.Name Partial name: Name Example isObjectAvailableOnServer("Flow", "MyTransformationStage")Returns trueif the Flow named MyTranformationStage is located on the server, false if it is not found. replaceIfAbsent replaceIfAbsent Comment Description replaceIfAbsent checks an expression for the value absent. If the value of the expression: is absent, replaceIfAbsent replaces the expression with another one is not absent, replaceIfAbsent returns the expression unchanged Syntax replaceIfAbsent(expression, replace_expression) Return replaceIfAbsent returns the same data class as the expression that it checks. It can check expressions of any data class. Parameters expressionEnter an expression from any data class replace_expressionEnter an expression from the same data class as expression Example The following example tests an input node for the value absent. If the returned value is absent, then the expression is replaced by a default value. replaceIfAbsent(CustomerType, default_CustomerType) replaceIfNull replaceIfNull Comment Description replaceIfNull checks an expression for the value null. If the value of the expression: is null, replaceIfNull replaces the expression with another one. is not null, replaceIfNull returns the expression unchanged. Syntax replaceIfNull(expression, replace_expression) Return replaceIfNull returns the same data class as the expression that it checks. It can check expressions of any data class. Parameters expressionEnter an expression from any data class replace_expression Enter an expression from the same data class as expression Example The following example tests an input node for the value null. If the returned value is null, then the expression is replaced by a default value. replaceIfNull(CustomerType, default_CustomerType) replaceIfNullOrAbsent replaceIfNullOrAbsent Comment Description replaceIfNullOrAbsent checks an expression for the values null and absent. If the value of the expression: is null or absent, replaceIfNullOrAbsent replaces the expression with another one. is not null or absent,replaceIfNullOrAbsent returns the expression unchanged. Syntax replaceIfNullOrAbsent(expression, replace_expression) Return replaceIfNullOrAbsent returns the same data class as the expression that it checks. It can check expressions of any data class. Parameters expression Enter an expression from any data class replace_expression Enter an expression from the same data class as expression Example The following example tests an input node for the value null or absent. If the returned value is null or absent, then the expression is replaced by a default value. replaceIfNullOrAbsent(CustomerType, default_CustomerType)