pkadam73
Level 5

Ambiguous column name while updating existing cost center id via business adapter for license object

Jump to solution

There was a need to change existing cost center id of a license,in the BA I just linked Name and used this for matching existing data , and the cost center id which needed to be changed but it gives error as Ambiguous column name "Cost Center ID" this happens when the update rule is set as Always update this column and when I choose Never update this column the simulation shows as 1 record updated (on testing one record via excel file) but there are no changes that take place.

0 Kudos
1 Solution

You cannot directly manipulate the Internal Database ID values as you are attempting to do in your adapter.  For example, to change the Cost Center assigned to a license, you must

1) Create a file that has the License Name and the new Cost Center value

2) Create a Business Adapter

3) Add the Cost Center object to the adapter.  On the main Cost Center object, uncheck the "All levels provided" check box, since you are not providing the entire path of the cost center, only the new Cost Center value.  Match on the Cost Center Name from your spreadsheet.

4) Add the License object to the adapter and match on the License Name.

5) Within the License object, click on the Cost Center ID field.  From the drop-down, select the CostCenter_ID value, which will be generated from the prior Cost Center match.

View solution in original post

7 Replies
ChrisG
Community Manager Community Manager
Community Manager

Can you post your adapter and a debug log (or at last some more details from the logging you are seeing) here? It is hard to tell from the information provided what might be wrong, but seeing the actual details may help somebody to give a more specific pointer to help resolve the problem.

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

Hi Chris,

I have attached the adatper xml the corresponding data spread sheet and the error logs.

0 Kudos
ChrisG
Community Manager Community Manager
Community Manager

I wonder if it is running into a problem because the column heading in the spreadsheet "CostCenterID" is the same as an table column name in the FNMS compliance database. Maybe try changing the column heading in the spreadsheet to something different, and update the adapter to use the new column heading name. Don't forget to change the reference to the spreadsheet column in the "trace field" setting in the adapter too!

(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.)
0 Kudos
my observations and experimentation suggests that the the table column names and spreadsheet headers have to be word to word same else it throws an error saying "Invalid Column name" since it cannot link to any column in the sheet, I wonder if this has got to do something with internal table relations while updating, although also please do consider that the corporate unit id gets updated properly despite having the same hierarchy as cost center id as in terms of they being parameters of Enterprise structure, is this a possible bug or some internal conflicts
Hi Chris

Is there any workaround or any other detail I have been missing that is causing this error.
0 Kudos

You cannot directly manipulate the Internal Database ID values as you are attempting to do in your adapter.  For example, to change the Cost Center assigned to a license, you must

1) Create a file that has the License Name and the new Cost Center value

2) Create a Business Adapter

3) Add the Cost Center object to the adapter.  On the main Cost Center object, uncheck the "All levels provided" check box, since you are not providing the entire path of the cost center, only the new Cost Center value.  Match on the Cost Center Name from your spreadsheet.

4) Add the License object to the adapter and match on the License Name.

5) Within the License object, click on the Cost Center ID field.  From the drop-down, select the CostCenter_ID value, which will be generated from the prior Cost Center match.

View solution in original post

Hi Captain Kirk,

Thanks for the solution, perhaps I wasn't using the BA efficiently.
0 Kudos