cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Business Adapter matching inventory with a custom field

Hi, I am trying to match computers with a value in custom field (the custom field visible in Flexera Web UI as well).

Matching with built-in fields such as computer name or serial number, but it fails with added custom fields, for example "Device notes"  value "ERP staging database"

However, BAS always gets error like:

12/16/2022 9:02:37 AM - Warning - Marking Existing Records
The multi-part identifier "compliancecomputer.ComplianceComputerTypeID" could not be bound.
The multi-part identifier "compliancecomputer.compliancecomputerid" could not be bound.

Is this table restriction since custom field is not foreign or primary key? 

Has anyone gotten this to work?

 

 

(6) Replies

There used to be a way to customize the XML as explained on URL below:

Solved: Re: Business Adapter Studio - matching with ComplianceComputerID instead of ComputerName - Community (flexera.com)

However, this method is declared as deprecated and does not work anymore. You would see a Red X against the name of custom field. Unless you add "IsCustomField="True" the adapter won't work, and if you do add it, then the system would through the same error. Am still researching on a way to accomplish it.

ChrisG
By Community Manager Community Manager
Community Manager

In my experience, matching on custom fields would normally work just fine.

It's hard to know what might be going wrong with your adapter based on the information provided. Are you able to share the adapter?

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)

Here is one, where the intention is to use ComplainceComputerID to update the status:

<?xml version="1.0" encoding="utf-8"?>
<root>
<ManageSoft connectiontype="default" ConnectionString="Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=FNMSCompliance;Data Source=DBServer" runintransaction="False" />
<Imports>
<Import Type="CSV" Delimiter="Comma" Name="Import1" Template="" Enabled="False" ConnectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=ADDRESSforXML;Extended Properties='text;HDR=Yes;FMT=Delimited'" Query="select * from [test.csv]" FileName="ADDRESSforXML\test.csv" TraceActions="created,deleted,updated,rejected">
<Object Type="Computer" Name="Computer" Update="True" Create="False" OutputField="Computer_ID">
<Property Type="ComplianceComputerID" Name="ComplianceComputerID" Update="Do not blank" ValueType="Field Value" Value="ComplianceComputerID"      UseForMatching="True" IsCustomField="True" />
<Property Type="compliancecomputerstatus" Name="Status" Update="Do not blank" ValueType="Field Value" Value="Status" Length="250" />
</Object>
</Import>
</Imports>
</root>

The short answer in relation to the above adapter is that you can't match on the ComplianceComputerID property in business adapters used with Flexera One ITAM.

If being able to do this would be of interest to you then I would suggest voting for the following Idea in Flexera Ideas related to this: FNMS-I-161: Business Adapter Studio: Expose Object IDs

FWIW, ComplianceComputerID is not a custom field, so should not have IsCustomField="True" specified:

<Property Type="ComplianceComputerID" [...] IsCustomField="True" />

However even fixing that won't help the adapter work.

Also for clarity, the original poster in this thread was asking about matching on custom fields, not built-in fields like ComplianceComputerID. I still can't immediately think of any reason why matching on custom fields would not work.

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)

Ah, I missed on the specific custom field. For us, as the tool is on-prem solution, hence, I was planning to create an additional field for UI for ComplianceComputerID to expose it.

Further, if we remove [IsCustomField="True"] then the adapter would become deprecated.
I'd share my findings as I get past this one.

Hi @VishalN  the problem is to inject the  complianceComputerID in the first place since it will not have anything to match to, eg. you would have to use serialno, name etc parameters to match. IF that route is taken, I noticed custom fields in inventory device cannot be directly used for matching. Instead I found that works is some other built-infield, eg. Chassisnumber that can be then be used to "smuggle" the compliancecomputerid to devices. The Chassisnumber is not visible for VMs but will anyway be saved and can be then used for matching. But again, the original problem remains - how to match the existinging/new devices exactly since complianceComputerID is not injected for those.

If you use assets you can use custom field with complianceComputerID for matching, but there is problem that Assets in turn are matched with serialnumber to inventory devices, making a mess in cases where devices have identical serialnumber and then the AssetID is matched from multiple devices to one device.

Please let us know if you find a workaround since this would be very valuable for the community as a whole.

 

BR, Antti

This is working if you create asset