Skip to main content
4-Participant
May 20, 2026
Question

Create an attribute to sort Documents with secondary content

  • May 20, 2026
  • 2 replies
  • 25 views

Hello,

I’m trying to create an attribute that could verify if a document posses a secondary content (a boolean would be enough) 

Once created, I will use that attribute in the advanced search’s view,  to be able to sort and show if the document has a secondary content or not 

I’m on Windchill 10.2, with my new standart attribute “HasSecondaryContent” in the type “Document”, but I don’t know how get the information about the secondary content into my attribute, or to add it in the list of attributes in the view modification’s window (I see it on the document detail page)

Do you have some hints to help me create that attribute ?

2 replies

17-Peridot
May 20, 2026

Hi ​@KévinM,

To retrieve objects that contain secondary content through an attribute in Advanced Search, the attribute value must first be persisted.
I would suggest updating the attribute value whenever content is attached or removed.
Additionally, for existing objects, you may need to create and run a utility to populate or update the attribute values accordingly.

20-Turquoise
May 20, 2026

You could do this with a custom calculated attribute:

New java algorithm for calculated attributes (BusinessAlgorithm) starting Windchill 11.0

https://www.ptc.com/en/support/article/CS226468

 

And using the following api’s:
How to programmatically get object attachments in Windchill PDMLink

https://www.ptc.com/en/support/article/CS58556

 

 

20-Turquoise
May 20, 2026

And like ​@TDT says you can’t advanced search for calculated attributes but these attributes will be available as column(s) to add in the Search Results table. Which you can then do as you described in that table.