I'm not a linear expect, so I can't tell you explicitly how the Linear add-on utilizes this, but the reason it's required for an integration is two fold. The first part is that it is part of the primary key column sequence on ASSETSPEC, which means it's one of the attributes that makes a record unique. You can see this information inside of Database Configuration. Typically you have to provide all values that make up the primary key column sequence to ensure a proper record match is found to update. If you left off the SITEID for example, that would be an issue as that same ASSETNUM could exist in multiple sites.
A logical follow up is that SECTION is also part of the primary key column sequence, but nobody provides it unless they're actually using it. Which gets into the second issue. LINEARASSETSPECID is set as required on ASSETSPEC, which means that null values are not allowed in the database. Instead IBM stores a 0 on this record when it's not a linear specification. Because the value is not null and makes up the primary key column sequence, it must be provided.
We've never really bothered to try and avoid it, just had it hardcoded to 0 to support it. You could try to define on the object structure an alternate key for ASSET->ASSETSPEC that doesn't include this attribute. You would need to define an index on ASSETSPEC inside of DB Config that contains ASSETNUM, SITEID, & ASSETATTRID (avoiding SECTION & LINEARASSETSPECID). You then reference the index on the Alternate Key field in the Object Structures application. That would probably avoid it. But for every object structure you create that connects ASSET->ASSETSPEC you would need to ensure that it's configured that way.
------------------------------
Steven Shull
Director of Development
Projetech Inc
Cincinnati OH
------------------------------
Original Message:
Sent: Fri July 17, 2020 09:41 AM
From: Sven Jahnke
Subject: Update Assetspec via MIF fails because of LINEARASSETSPECID != 0
Within table Assetspec the attribut LINEARASSETSPECID has same value as ASSETSPECID, else 0, also within same assetattrid.
Updating via MIF/ES following error occurs for those without value 0:
BMXAA0192E - The combination of Attribute <Attributname> and Section already exists for this classification.
Although giving Section and/or LINEARASSETSPECID with the request.
Updating in UI is no problem.
Don't know for what the attribute LINEARASSETSPECID exists???
Only found https://www.ibm.com/mysupport/s/question/0D50z000060d9sOCAQ/cannot-update-assetspec-using-mxasset-object-structure-in-mif?language=en_US gefunden , but there's no solution mentioned.
Any idea?
There's no index on the table relating to LINEARASSETSPECID.
------------------------------
Sven Jahnke
------------------------------
#AssetandFacilitiesManagement
#Maximo
#MaximoEAM