CA Service Management

Expand all | Collapse all

Deleting Forms in CA Service Catalog

  • 1.  Deleting Forms in CA Service Catalog

    Posted Aug 26, 2016 07:27 AM

    Hi all, 

    I am trying to delete a form in Catalog. 

     

    You can see that there are no children associated with this. 

    However, the delete option is still grayed out. 

     

    Can anyone please assist. 



  • 2.  Re: Deleting Forms in CA Service Catalog

    Broadcom Employee
    Posted Aug 26, 2016 07:30 AM

    Hi James.

     

    For which release of CA Service Catalog(SC) are you checking this?

    Is this form part(child) within a folder?

    Do you have a picture of the 'folder tree' as seen in the SC-UI?

    Does this happen for all of the forms/other forms too?

     

    Please let me know. Thanks in advance and kind regards, Louis van Amelsfort.



  • 3.  Re: Deleting Forms in CA Service Catalog

    Posted Aug 26, 2016 07:39 AM

    Hi Louis, 

    Here's a bigger picture

    "Junk" is the one I'm trying to delete. 

     

    I can add something under "Junk" and then delete it

    But after deleting the line in the red circle, I can't delete "Junk"



  • 4.  Re: Deleting Forms in CA Service Catalog

    Posted Aug 26, 2016 07:50 AM

    Would I need to delete at a database level? .....I hope not



  • 5.  Re: Deleting Forms in CA Service Catalog
    Best Answer

    Broadcom Employee
    Posted Aug 26, 2016 07:53 AM

    Hi James.

     

    Thanks (SC R14.1?).

     

    When you hit the 'red-circle' form element, and you try to edit/change an attribute (e.g. required), do you then get a popup about 'Requestor Personal Information' associated with a request'?

     

    When yes, that might be the cause of not being able to delete the form.

    There is (still) a request out there, referencing this form.

     

    As a test, copy the issue-form and paste it. In the copy, you can delete all of that form, right?

     

    Kind regards, Louis.



  • 6.  Re: Deleting Forms in CA Service Catalog

    Broadcom Employee
    Posted Aug 26, 2016 08:03 AM

    Hi James.

     

    When you 'remove' the request(s) associated with the form(element), you should be okay.

     

    Kind regards, Louis.



  • 7.  Re: Deleting Forms in CA Service Catalog

    Posted Aug 26, 2016 08:44 AM

    Hi Louis, 

    How do I 'remove' the requests associated with this form called "Junk"?

    The form has been removed from all possible Option groups where it was previously referenced. 

    I hope I don't have to go through all requests that have been raised using this form??

     

    W.R.T your SQL query, now that Junk has no children, and I run your query

    select r.request_id,rif.* from usm_request r

    join usm_subscription_detail sd on r.request_id = sd.request_id

    join usm_request_item_form rif on sd.id = rif.subscription_detail_id

    where rif.form_elem_name = 'addr1'

     

    How do I reference the correct rif.form_elem_name when there are now no elements under "Junk"?

    Hope this makes sense?



  • 8.  Re: Deleting Forms in CA Service Catalog

    Broadcom Employee
    Posted Aug 26, 2016 08:13 AM

    Hi James.

     

    A query on the mdb that could help you further, where 'addr1' is the name of your form-element:

     

    select r.request_id,rif.* from usm_request r

    join usm_subscription_detail sd on r.request_id = sd.request_id

    join usm_request_item_form rif on sd.id = rif.subscription_detail_id

    where rif.form_elem_name = 'addr1'

     

     

    Thanks and kind regards, Louis.



  • 9.  Re: Deleting Forms in CA Service Catalog

    Broadcom Employee
    Posted Aug 26, 2016 08:26 AM

    Hi James.

     

    A small update about the "where rif.form_elem_name = 'addr1'".

    The value 'addr1' is the value of the _id attribute of the form element.

    SC/Catalog/Forms/Forms>your form>your element.

     

    Kind regards, Louis.



  • 10.  Re: Deleting Forms in CA Service Catalog

    Broadcom Employee
    Posted Aug 26, 2016 08:58 AM

    Hi James.

     

    Yes it makes sense. It is a kind 'chicken and the egg' situation, right? :-)

    Do you have 'another' environment where you could check for the form elements's '_id' value(s)?

    And use that then in the query as proposed earlier?

     

    Kind regards, Louis.



  • 11.  Re: Deleting Forms in CA Service Catalog

    Posted Aug 26, 2016 09:46 AM

    Thanks Louis, 

    We have just the test and live environment. 

    I fortunately don't have this issue on live, it's just frustrating trying to delete a form, don't know what the chicken or the egg is

     

    I ran a 

    delete from usm_request where request_id in ???

    because I only ran a few requests on this. 

     

    This seems to have done the trick. 

     

    Thank you so much for your assistance and pointing me in the right direction. 



  • 12.  Re: Deleting Forms in CA Service Catalog

    Broadcom Employee
    Posted Aug 26, 2016 10:38 AM

    Hi James. Thanks for resolving this.

    As for a possible future and similar situation, please check the below and save it in a 'documentation' folder of some kind:

     

    In the end, it indeed needs several mssql queries to be executed onto the mdb database.

     

    Find the form_entity_id for the form you want to delete.
    You can get this from the usm_form_entities table by executing these queries:
    1 select * from usm_form_entities where form_entity_name like '%Junk%'

    Take the form_entity_id from the above result and execute:
    2 select * from usm_rate_definition where text_1 ='<form_entity_id>'
      Check the values of columns text_1 and text_2 in the above query result

    Then execute:
    3a update usm_rate_definition set text_1='Null' where text_1='<form_entity_id>'
    3b update usm_rate_definition set text_2='Null' where text_2='Junk'
     
    You can run the following queries to see if the form is part of any active request:
    select r.request_id,r.status,rif.* from usm_request r
    join usm_subscription_detail sd on r.request_id = sd.request_id
    join usm_request_item_form rif on sd.id = rif.subscription_detail_id
    where rif.form_elem_name like '%addr1_%'

     

    Or, in your case, where you do not know the <form_elem_name> anymore:

    select * from USM_FORM_ENTITIES where form_entity_type = 2 and form_entity_name like '%Junk%'

     

    Take the form_entity_id value from the above query result and execute:
    select request_id,* from usm_subscription_detail where text_1 ='<form_entity_id>'

     

    Take the request_id from the above query result and execute(for each request_id):
    delete from usm_request where request_id = '<request_id>'
    delete from usm_subscription_detail where request_id = '<request_id>'

     

    After this:
    1 Stop the SC service
    2 Empty the translets folder
    3 Empty the brower cache
    4 Login to SC-UI
    5 You will be able to delete the form, from SC/catalog/Forms/Forms>Junk in the UI

     

    Kind regards, Louis.



  • 13.  Re: Deleting Forms in CA Service Catalog

    Posted Aug 26, 2016 11:05 AM

    I should have marked this as the correct answer. 

    Thank you so much, this is very helpful indeed. 

    Have a brilliant weekend!