Hello Guys,
Can't figure out why and hope someone can help me.
I have a product list with PLS name stored as CSV. We have a custom field named 'PLS List Name' added to license object.
Product name column from CSV file matches the custom field 'PLS List Name' in FNMS.
The adapter is supposed to update the manager field on License object using the Product name for matching.
So the data loaded (here filtered) looks like this:
There is 16 licenses with 'PLS List Name' field as 'MS Windows Server' in FNMS:
But for some reason, after adapter is run only one license is updated:
The adapter itself is:
<?xml version="1.0" encoding="utf-8"?>
<root>
<ManageSoft connectiontype="ecm" runintransaction="False" />
<Imports>
<Import Type="CSV" Delimiter="Comma" Name="UpdatePLS" Template="" Enabled="False" ConnectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\Sync with PLS Product List adapter;Extended Properties='text;HDR=Yes;FMT=Delimited'" Query="select * from [PLS Product List.csv]" FileName="E:\Sync with PLS Product List adapter\PLS Product List.csv">
<Object Type="User" Name="User" Update="False" Create="False" OutputField="User_ID">
<Property Type="username" Name="User Full Name" Update="Do not blank" ValueType="Field Value" Value="Product License Specialist" UseForMatching="True" Length="512" />
</Object>
<Object Type="License" Name="License" Update="True" Create="True" OutputField="License_ID">
<Property Type="pmi_pls_list_name" Name="PMI_PLS_List_Name" Update="Do not blank" ValueType="Field Value" Value="Product name" UseForMatching="True" IsCustomField="True" />
<Property Type="managerid" Name="Manager ID" Update="Do not blank" ValueType="Field Value" Value="User_ID" DataType="Integer" />
</Object>
</Import>
</Imports>
</root>
Does anyone see what I am missing?
Best,
Paweł
May 14, 2024 06:35 AM
What you are describing is how business adapters work "by design". Each row of source data imported by a business adapter is mapped to at most 1 record to be updated. If the field(s) in the source data used for matching happen to match up with multiple records in FNMS, only one of the matching records is chosen to be updated.
With this in mind, it is generally expected that the field(s) used for matching will be sufficient to uniquely identify the exact record you want to update.
In your scenario, with 16 licenses to be updated you should ensure there are 16 rows of source data being imported. You would probably need to use the license name for matching (unless you can identify another set of fields which will uniquely identify each license record to be updated).
May 14, 2024 06:46 AM
What you are describing is how business adapters work "by design". Each row of source data imported by a business adapter is mapped to at most 1 record to be updated. If the field(s) in the source data used for matching happen to match up with multiple records in FNMS, only one of the matching records is chosen to be updated.
With this in mind, it is generally expected that the field(s) used for matching will be sufficient to uniquely identify the exact record you want to update.
In your scenario, with 16 licenses to be updated you should ensure there are 16 rows of source data being imported. You would probably need to use the license name for matching (unless you can identify another set of fields which will uniquely identify each license record to be updated).
May 14, 2024 06:46 AM
Thanks @ChrisG , that explains it.
May 15, 2024 03:18 AM