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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Updating WTDocument name and number

VanVelZ
10-Marble

Updating WTDocument name and number

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 

ACCEPTED SOLUTION

Accepted Solutions
HelesicPetr
22-Sapphire I
(To:VanVelZ)

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

View solution in original post

8 REPLIES 8

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. 🤦‍♂️😁

BenLoosli
23-Emerald II
(To:VanVelZ)

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

ZV_10709691_0-1704999629577.png

 

BenLoosli
23-Emerald II
(To:VanVelZ)

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.

HelesicPetr
22-Sapphire I
(To:VanVelZ)

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

Y.Driouchy
14-Alexandrite
(To:VanVelZ)

There is nothing wrong with the query and it gets the expected outcome, documents remains editable : 

YDriouchy_0-1705415504370.png

  • update WTDocumentMaster set WTDocumentNumber = 'New Number', Name='New Name' where WTDocumentNumber= 'WEX2069147649';

YDriouchy_1-1705415580918.png

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.

Announcements


Top Tags