Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Version: Windchill 12.1
Use Case: Facing issue while updating attribute in windchill.
Description:
Getting this error response while updating attribute in windchill for CAD Part using java api. - com.ptc.core.command.common.InvalidConstraintForAttributeException: com.ptc.core.meta.container.common.RecoverableConstraintException:
The value for attribute Facility must be one of the following: A-1 Test Facility, A-2 Test Facility, A-3 Test Facility, A-Complex, B-1 Test Facility, B-2 Test Facility, B-Complex, E-1 Cell 1, E-1 Cell 2, E-1 Cell 3, E-1 Test Facility, E-2 Cell 1, E-2 Cell 2, E-2 Test Facility, E-3 Cell 1, E-3 Cell 2. The pre-existing value may no longer be valid for this attribute. null.
Can someone help resolving this issue.
Can you share a bit of your code for updating, values you are using and details on the constraints currently for this attribute? I see that it is listing some but what do you see in the Type Manager? Is this for PartsLink?
From what you have written it’s hard to say what is the exact cause of the error.
Clearly you have a Sting attribute named Facility and you are attempting to update (and maybe iterate the IBAHolder, you did not state what the object type is).
You might be trying to update an attribute other than Facility, but Facility is still the fly in the ointment because its current value is not in your constraint list.
You really need to state exactly what you are doing in the Use Case: field.
”Facing issue while updating attribute in windchill.” is not a use case. It just isn’t.
Give us all the details and we can help. But please don’t make people ask for details. Supply all the details in the initial post. Think of it this way, include all the info you would be asking for if you were asked to solve the problem. Complete info is always better than partial info, which turns this into a guessing game. 🤦♂️