Loading...
https://bestmicrosoftdynamicsgponlinetraining.blogspot.com/2015/06/dynamics-gp.html
There are some situations when importing data into GP where you want to have a consistent or fixed length to a number.
Say you are importing Employees, and your source data file has numeric employee IDs such as 123 or 2345. But suppose that you want all employee IDs to be a consistent 5 digits, with leading zeroes, in Dynamics GP. So instead of 123, you want 00123, and instead of 2345, you want 02345.
Here is an Integration Manager field script to "pad" the Employee ID with leading zeroes. It uses the VB Script Right function, which lets you easily pad a field value with leading zeroes.
CurrentField = Right("00000" & SourceFields("SourceName.EmployeeID"), 5)
This could also be used if you want to prefix an alpha value at the beginning of a document number.
So if you were importing invoices, and the data file had invoice 4567, and you wanted "INV00004567", you could do something like this:
CurrentField = "INV" & Right("00000000" & SourceFields("SourceName.DocNum"),
8)
That
produces a consistent 8 digit invoice number, to which you can prefix
"INV".
virtualnuggets
1256933921804549192
Post a Comment Default Comments Facebook Comments
Home
item
Popular Posts
-
The latest version of Dynamics GP 2013 (Version 12) was released by Microsoft on Dec. 19, 2012.; For the first time the software has evolv...
-
Business may changes you notice it every day. Customer tastes and competitive dynamics change in a heartbeat. Your market is evolving, wit...
-
There are some situations when importing data into GP where you want to have a consistent or fixed length to a number. Say you are...