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.
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.
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.
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"
Would I need to delete at a database level? .....I hope not
When you 'remove' the request(s) associated with the form(element), you should be okay.
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?
A query on the mdb that could help you further, where 'addr1' is the name of your form-element:
Thanks and kind regards, Louis.
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.
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?
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.
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 rjoin usm_subscription_detail sd on r.request_id = sd.request_idjoin usm_request_item_form rif on sd.id = rif.subscription_detail_idwhere 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 service2 Empty the translets folder3 Empty the brower cache4 Login to SC-UI5 You will be able to delete the form, from SC/catalog/Forms/Forms>Junk in the UI
I should have marked this as the correct answer.
Thank you so much, this is very helpful indeed.
Have a brilliant weekend!
Retrieving data ...