Question
When Mapper's "Add" logic adds a value to a numeric type script variable, and then maps the result to the scheme of a destination component and assigns it to the script variable simultaneously, the value output to the destination component is the result of performing the addition twice.
What is the cause and how can I fix it?
Answer
-Specifications
The above behavior is caused by the following specifications of Document Mapper and Variable Mapper.
------
Assignments to script variables are performed only once before writing into the output destination component.
------
As an example, if a numeric type script variable "var" with an initial value of "0" is added by 2 using [Add] logic, and assign the value to the script variable "var" and a destination component, the behavior would be as follows:
The value "2" is assigned to the script variable "var".
The script variable "var" is added by "2" again, and the destination component outputs "4".
-Workaround
Please use different Mappers for assignments to script variables and to a destination component.
Reference
[Document Mapper/Variable Mapper (Details)] - [Specification Limits]
https://www.hulft.com/help/en-us/HULFTSquare/Content/Designer/Mapper/mpp_detail.htm
Comments
0 comments
Article is closed for comments.