Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Patrick,
I found 137 WTDoc, 613 WTParts and 499 EPMDocs with this condition.
Therefore this had to be done with a few scripts. I'll try to be very
clear in the details of what I did.
First whether the icon appears or not is determined in the dB tables
WTDocument, WTPart and EPMDocument.
Run describe on WTDoc, WTPart or EPMDoc. All three have columns that
determine if the icon is displayed.
In the image below I point to "HASRESULTINGCHANGE" column.
Value for this column is either 0 or 1 (it is either a resulting item in a
Change Activity or it is not) I was only concerned with resulting items.
Affected Data would be a different column but I think you get the idea.
For the purpose this mail we will focus only on Resulting Items.
Sadly my SQL is not great therefore to solve at the dB level I did the
following.
I spooled the output of every WTDocument where HASRESULTINGCHANGE=1 to a
text file. We will call 1.txt
select ida2a2 from WTDocument where HASRESULTINGCHANGE=1;
I then wrote a Java script to read my spooled file and write an sql script
that finds ida3b5 from ChangeRecord2 where ida3b5=<the ida2a2=" from=" the=" <br="/>WTDocument>
A ChangeRecord2 is nothing more than a link that connects a Changable to a
Change Activity.
This would return all legitimate id number where HASRESULTINGCHANGE=1
select ida3b5 from ChangeRecord2 where ida3b5=<the ida2a2=" from=" the=" <br="/>WTDocument>;
I then spooled the output from my sql script to another text file. We will
call 2.txt
1.txt has all id number of WTDocs where HASRESULTINGCHANGE=1
2.txt has id numbers of all legitimate WTDoc where HASRESULTINGCHANGE=1
I wrote another Java method to compare the two files and output a second
sql script.
Any number that is in 1.txt that was not also in 2.txt needs to be
changed. When my method found such a number it wrote to the second sql
file
update WTDocument set HASRESULTINGCHANGE=0 where ida2a2= <the number=" that=" <br="/>was found>;
I then ran this second sql script and problem was gone.
Somewhat complicated but logical I think.
Let me know how you make out and feel free to call if you need any help.
David Graham
Windchill Administrator
Pro|ENGINEER Administrator
CAx Administrator
Emhart Glass Manufacturing Inc.
Emhart Glass Research Center
123 Great Pond Drive | Windsor, CT 06095 | USA
Telephone +1 (203) 376-3144 | Telefax +1 (860) 298 7397
Mobile +1 (203) 376-3144 | http://www.emhartglass.com