Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
I am attempting to change the name and number of a WTDocument via SQL. It is my understanding that these values are shared across all iterations of a WTDocument and the values are saved in WTDocumentMaster. However, when I update the column of WTDocumentMaster, those changes do not reflect on Windchill. I also receive a persistence error when attempting to edit these documents via the UI.
Is there any guidance as to how I can get the document name and numbers updated without causing issue? Thank you in advance
Solved! Go to Solution.
Hi @VanVelZ
Hi what error have you got from system after changing the DocNumber?
If you just change Number of WTDocument directly in database, there is no issue with consistency.
Check-out/in, upload, download no problem with new number.
So you had to do something wrong.
PetrH
Hi ZV_10709691,
Welcome to the PTC Community!
Thank you for your question.
I’d like to recommend to bring more details and context to your initial inquiry. Please provide what release and datecode you are using. Additionally please provide SQL command / query that you are running.
It also helps to have screenshot(s) to better understand what you are trying to do in your process.
This will increase your chances to receive meaningful help from other Community members.
Regards,
Anurag
We are running Windchill 11.1 M020-CPS22.
The initial query ran was something along the lines of
update WTDocumentMaster set WTDocumentNumber = 'New Number', Name='New Name' where WTDocumentNumber= 'Old Number'
From what you showed us it looks like you never committed the update to the dB. 🤦♂️😁
What is your reasoning for wanting to do this change with SQL rather than with the Windchill UI?
There are many relations that are carried throughout the database that may prevent you from seeing your SQL level change.
WTDocuments do not provide a UI for editing name and number on our instance and It does not appear to be something that could be toggled briefly. I am not locked in to doing this via SQL and am open to other solutions
I would get with your system admin and look at system preferences and/or privileges and see why a WTdocument object cannot be renamed? We don't use Wtdocuments here, just Wtparts and those can be renamed in the UI.
Hi @VanVelZ
Hi what error have you got from system after changing the DocNumber?
If you just change Number of WTDocument directly in database, there is no issue with consistency.
Check-out/in, upload, download no problem with new number.
So you had to do something wrong.
PetrH
There is nothing wrong with the query and it gets the expected outcome, documents remains editable :
You might need to check with the admin if such change is allowed in your instance, not violating some business rule.
Also providing the persistence error you get can help clarify where the issue is.
the more details you can give, helps you get accurate/faster answers.