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

Updating consumed entitlement (for custom matrix type) using business adapter

Hi,

 

Is there any way we can update consumed Consumed entitlements field using business adapter ?

 

i can not find the Consumed entitlements property in Licenses adpater.

 

Regards,

Junaid Vengadan

(1) Solution

I dug up an example of this to illustrate.

Say you have an adapter with an import named "ImportCustomMetricLicenseDetails" which obtains source data from a spreadsheet or database with a query like the following that identifies unique names and consumption counts for licenses which you know to have a type of "Custom Metric":

SELECT LicenseName, ConsumptionCount FROM ...

You could then add a custom object query such as the following in the adapter to update the consumption counts:

UPDATE sl
SET NumberInstalled = i.ConsumptionCount
FROM dbo.SoftwareLicense sl
    JOIN #ECMImport_ImportCustomMetricLicenseDetails i ON i.LicenseName = sl.Name

If your adapter is configured to use a permanent table (rather than temporary table) to hold the staged source data then change the "#ECMImport_ImportCustomMetricLicenseDetails" table name to "ECMImport_ImportCustomMetricLicenseDetails".

Note that custom object queries like this can only be used with adapters that run in FlexNet Manager Suite On-premises; they cannot be used with FlexNet Manager Suite Cloud / FlexeraOne ITAM.

(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.)

View solution in original post

(8) Replies
ChrisG
By Community Manager Community Manager
Community Manager

Take a look at the following forum thread which discusses this topic: Update Custom Metric license consumption automatically? (using adapter or other means)

(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.)

@ChrisG

Thanks a lot for the feedback.

but can we use this when we are using source as csv\xlsx ?

Seems the query mentioned in the article is for updating a fixed value.

 

Reagrds,

Junaid Vengadan

 

Hi @emtmeta.
You need a source to "tsart the connections. If your source is a a csv with 2 columns, License Name and Manual consumption, import that to a physical table; then use the update script provide to set consumption using a join to your physical table.
Regards
@Nico_Erasmus

i think that is going to be a complex process.

As we can import other properties from csv to FNMP without using a intermediate physical table .

There should be something like temporary table like we have for other imports.

Regards,
Junaid Vengadan

Hi @emtmeta .  Not complex at all.  You just tick the box at the bottom of the properties tab - advanced properties, use physical table.  Then you can work with that physical table using your other sql update queries.

 

Regards

@Nico_Erasmus  

yeah , that's sounds the correct and simple way, thanks mate 🙂

 

@ChrisG  thanks for the quick reply as always , really appreciated .

 

Cheers,

Junaid Vendagan

I dug up an example of this to illustrate.

Say you have an adapter with an import named "ImportCustomMetricLicenseDetails" which obtains source data from a spreadsheet or database with a query like the following that identifies unique names and consumption counts for licenses which you know to have a type of "Custom Metric":

SELECT LicenseName, ConsumptionCount FROM ...

You could then add a custom object query such as the following in the adapter to update the consumption counts:

UPDATE sl
SET NumberInstalled = i.ConsumptionCount
FROM dbo.SoftwareLicense sl
    JOIN #ECMImport_ImportCustomMetricLicenseDetails i ON i.LicenseName = sl.Name

If your adapter is configured to use a permanent table (rather than temporary table) to hold the staged source data then change the "#ECMImport_ImportCustomMetricLicenseDetails" table name to "ECMImport_ImportCustomMetricLicenseDetails".

Note that custom object queries like this can only be used with adapters that run in FlexNet Manager Suite On-premises; they cannot be used with FlexNet Manager Suite Cloud / FlexeraOne ITAM.

(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.)
Hi Chris,

Sorry i missed the last comment,

Yeah i have tried almost similar query and it worked.

i had special case to read only one column from a source table and hence i used select and update using single query.


Idea of physical table is really helpful

cheers,
junaid vengadan