How to indentify duplicate form component _id values in CA Service Catalog
Article ID: 127784
CA Service Management - Asset Portfolio ManagementCA Service Management - Service Desk Manager
Since r17.1 RU2 I get an error when I want to edit some forms. When clicking on the form it says "there was an error detected please contact your system administrator". And the form gets loaded there after. At the top is a message in red displayed which says that there could be problems using Java Script because of duplicated _id properties but it does not show which _id it should be.
You can execute the below query (mssql) against the mdb database. To retrieve the '_id' attribute is being used more than once.
--query to find components with duplicate _id values WITH Form (form_entity_id, form_entity_name, form_entity_parent_id, Hir) AS ( -- Anchor member definition SELECT rt.form_entity_id, rt.form_entity_name, rt.form_entity_parent_id, 0 AS Hir FROM usm_form_entities rt -- Fill in the name of your form here below, between the single quotes: WHERE rt.form_entity_name = 'AllComponent - Editable' UNION ALL -- Recursive member definition SELECT rec.form_entity_id, rec.form_entity_name, rec.form_entity_parent_id, Hir + 1 FROM usm_form_entities rec INNER JOIN Form AS Par ON Par.form_entity_id = rec.form_entity_parent_id ) select vals.Attr_value from USM_FORM_COMPONENT_ATTRIBUTES vals join USM_FORM_ENTITIES form on vals.form_comp_id = form.FORM_ENTITY_ID where vals.ATTR_NAME = '_id' and form.form_entity_id in (SELECT form_entity_id FROM Form) group by vals.Attr_value having count(form.FORM_ENTITY_ID) > 1 order by vals.Attr_value