cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Cannot delete a State that has no references

DanR.
12-Amethyst

Cannot delete a State that has no references

How can I delete a state which is no longer needed nor is it used. All references to i have been deleted.

Here is what I've tried in CLI:

im deletestate --hostname=mks state_name

Deleting state...

Submitting...

Delete state state_name? [yn](n): y

State "state_name" cannot be deleted because it is still being referenced and a database constraint will not allow it to be deleted. If Items have been created that reference this State, you will not be able to delete this State until you deleted those Items. If this state is referenced by admin objects, you can find where it is being referenced by viewing the State and selecting the Refences tab.

The References tab display no references.

When I try to view references view CLI:

im viewstate --hostname=mks --showreferences state_name

-------------------------

Created by user_name (user_name) on Jul 19, 2004 1:02:41 PM

Modified by user_name (user_name) on Jun 4, 2014 8:12:00 AM

State: state_name

Description:

Blah Blah

Image: none

Position: 120

Capabilities: none

References:

-------------------------

ACCEPTED SOLUTION

Accepted Solutions
JoeBartlett
21-Topaz I
(To:DanR.)

You would need to query for them using the History (by value) condition.

Query1.png

Query2.png

View solution in original post

4 REPLIES 4
JoeBartlett
21-Topaz I
(To:DanR.)

Hi Dan,

The error message does indicate that if there are historical references (in item history) then you have to delete those items before you can delete the state. This is often the case if it complains about references but the References tab or --showreferences flag return no results.

DanR.
12-Amethyst
(To:JoeBartlett)

How would I be able to find those historical references?

JoeBartlett
21-Topaz I
(To:DanR.)

You would need to query for them using the History (by value) condition.

Query1.png

Query2.png

DanR.
12-Amethyst
(To:JoeBartlett)

I found them. Thank you!

Announcements


Top Tags