Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

VBScript to convert a negative number to a positive number by using Integration Manager for Microsoft Dynamics GP


Introduction

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.

↑ Back to the top


Summary

This article discusses how to add a VBscript to a field item to convert a negative number to a positive number.

↑ Back to the top


More Information

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:
  1. Start Integration Manager. To do this, follow the steps for your version of the program.

    Integration Manager for Microsoft Dynamics GP
    1. Click Start.
    2. Click All Programs.
    3. Click Microsoft Dynamics.
    4. Click Integration Manager.
    5. Click Integration Manager.
    Integration Manager for Microsoft Business Solutions – Great Plains 8.0
    1. Click Start.
    2. Click All Programs.
    3. Click Microsoft Business Solution 8.0.
    4. Click Integration Manager (the folder).
    5. Click Integration Manager (the shortcut).
  2. Open the integration to which you want to add the script. To do this, follow these steps:
    1. Click Open Integration on the toolbar.
    2. On the list, select the integration that you want.
    3. Click Open.
  3. Add the script to the Integration field. To do this, follow these steps:
    1. Click Mapping on the toolbar.
    2. Select the folder or the cube that has the field that you want to add the script.
    3. Locate the field that you want to add the script.
    4. In the Rule column, click the list, and then click Use Script.
    5. 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.
    6. 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 = Variable
      Notes
      • 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.
    7. On the File menu, click Save and Close.

↑ Back to the top


Keywords: kbnosurvey, kbmbspartner, kbmbsmigrate, kb

↑ Back to the top

Article Info
Article ID : 859750
Revision : 1
Created on : 3/3/2017
Published on : 12/30/2014
Exists online : False
Views : 92