This article discusses how to add a script to an integration to convert negative numbers to positive numbers in Integration Manager for Microsoft Dynamics GP or for Microsoft Business Solutions – Great Plains.
Introduction
This article discusses how to add a VBscript to a field item to convert a negative number to a positive number.
Summary
When you import data through Integration Manager for Microsoft Dynamics GP or for Microsoft Business Solutions – Great Plains, you may have to convert a number from a negative value or amount to a positive value or amount. To do this, follow these steps:
-
Start Integration Manager. To do this, follow the steps for your version of the program.
Integration Manager for Microsoft Dynamics GP-
Click Start.
-
Click All Programs.
-
Click Microsoft Dynamics.
-
Click Integration Manager.
-
Click Integration Manager.
Integration Manager for Microsoft Business Solutions – Great Plains 8.0
-
Click Start.
-
Click All Programs.
-
Click Microsoft Business Solution 8.0.
-
Click Integration Manager (the folder).
-
Click Integration Manager (the shortcut).
-
-
Open the integration to which you want to add the script. To do this, follow these steps:
-
Click Open Integration on the toolbar.
-
On the list, select the integration that you want.
-
Click Open.
-
-
Add the script to the Integration field. To do this, follow these steps:
-
Click Mapping on the toolbar.
-
Select the folder or the cube that has the field that you want to add the script.
-
Locate the field that you want to add the script.
-
In the Rule column, click the list, and then click Use Script.
-
Open the Script Editor window. To do this, locate the Value column in the lower-left corner of the Integration Mapping window. Then, click the ellipsis button.
-
Copy the following script into the Script Editor window.
'Converts a value from a negative to positive
DIM Variable
Variable = Abs(SourceFields("Queryname.Columnname"))
CurrentField.Value = VariableNotes
-
Variable can be defined as anything. However, it must be consistent throughout the script.
-
Replace Queryname with the name of the Integration Manager Source Name from which this field is mapped.
-
Replace Columnname with the name of the column that is displayed when you preview the source in Integration Manager.
-
-
On the File menu, click Save and Close.
-