Skip to content


Company Selection

Mick Egan asked 9 years ago
Is there a way to import data into a particular company if multiple companies are selected using the same excel datasource.  Ideally, I would like to use one MAP and have a identifer in the datsource to which company the data should be imported?
Best Answer
Ken answered 9 years ago
Hi Mick,
The way to import the data to the particular company from the Excel sheet is to create a script to determine which records go to which companies.
Open your map and destination, then click on the companies button. In the Companies window, click on the “Define” option which will open the “Map Destination Definition” where you can script the definition of the destination company based on the particular column from the Excel sheet.
Make sure that you uncheck any columns in the companies window or data will go to the selected companies as well as the company defined by the script.
For example: if you have a column in your spreadsheet (COMPANY) that holds the company id the following script could be used.
return _COMPANY;
return _COMPANY
If more than one field determines the company then use an if or switch statement to return the correct code.
If(_FIELD1 == “value1” && _FIELD2 == “value2”)
                return “TWO”;
return “ONE”;
If _FIELD1 = "value1" AndAlso _FIELD2 = "value2" Then
                    Return "TWO"
                    Return “ONE”
End If
Mick Egan replied 9 years ago

Ken,  I was wondering if that is where it got selected, thanks very much for confirming and providing the required code, will test this out shortly.  Regards,  Mick

Robinson replied 8 years ago

did this ever worked I am using the return _CompanyID or Return “TEST1” and I am getting error message:
Error Updating SY01500 table wit next note index Note Identifier Parameters: tasmGetNetNoteIndex

unable to obtain next note index. Note identifier parameters: taCreateUpdateBatchHeaderRct

unable to update/create the batch Number node identifier parameters: taSopHdrIvcInsert…

Robinson answered 8 years ago
Nevermind.. I found out what the issue was… I am using a difference SQL Instance for the SmartConnect 2013 and the destination instance. This is just I can have SmartConnect 10 and SmartConnect 2013 co-existing.
Karim Elmansoub replied 7 years ago

i have done that and it was very helpfull and work properly by what about configure the voucher number as gp rolling column required to choose specific company can you help please

If you would like to submit an answer or comment, please sign in to the eOne portal.