This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SUPPORT Q&A - Updating lifecycle name change on parts

ejmoska - Wednesday, July 20, 2016 4:42 AM:

Hello,

We currently have a database with around 3000 components and would like to make slight modifications to the names of lifecycle states (Translate from English to Local Language)

I have so far added labels to lifecycle states, the lifecycle under Part does reflect the change, but state on the main grid does not.

Is there anyway to update the lifecycles so they would show updated values without resetting released state of parts?

Thanks for the help



edonahue - Wednesday, July 20, 2016 12:20 PM:

Hi ejmoska,

Every item has a system property "state" that contains the string name/label of the item's Life Cycle State and a property "current_state" that contains the GUID of the item's Life Cycle State. The behavior you are seeing is occurring because the state property on the Part does not match the updated Life Cycle State label. You will need to update your existing Parts via SQL to modify the state's label without versioning released Parts. 

The following SQL query will show you the scope of the data you will be editing.

SELECT DISTINCT P.current_state AS 'State GUID', 
     P.[state] AS 'State Now', 
     LCS.label AS 'State After Change'
FROM innovator.[LIFE_CYCLE_STATE] LCS
INNER JOIN innovator.[PART] P ON LCS.id=P.current_state

The following SQL query will update all Parts with the appropriate Life Cycle State's new label.

UPDATE P
SET P.[state] = LCS.label
FROM innovator.[LIFE_CYCLE_STATE] LCS
INNER JOIN innovator.[PART] P ON LCS.id=P.current_state


NOTE!
Before applying any SQL changes directly to an Innovator database:

  • Be sure to create a back up of the database in the event that you need to rollback your changes. 
  • Always confirm SQL queries in a test environment before applying to a production environment.