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

Webject to retrieve custom attribute with name Class

sdaftardar
12-Amethyst

Webject to retrieve custom attribute with name Class

Hi, 

We have a use-case where we have added some custom attributes in Windchill. 

We retrieve the values against these attributes using Query-Objects webject , like so 

 

<ie:webject name="Query-Objects" type="OBJ">
<ie:param name="instance" data="${@FORM[]supporting-adapter[*]}"
valueSeparator=";" delim=";"/>
<ie:param name="attribute" data="name,Class" delim=","/>
<ie:param name="group_out" data="objects"/>
</ie:webject>

 

This works fine with almost all attributes, however, if the attribute Name is "Class", it returns the class-type of the object and not the actual value. 

e.g.

TestPart

         Class: "ABC"

 

Returned Value:  WCTYPE|wt.part.WTPart|local.eQVM.TestPart

Expected Value: ABC

 

Is there a way we can mask/escape class attribute Name to get expected Data?

 

1 REPLY 1

@sdaftardar 

I believe the short answer is no on escape.

The thing is escape characters are used when programming and that not what is going on here.

 

You can get the information other ways programmatically using the Windchill APIs but using a webject I don’t think will get you there.

 

Seems like you may have found a bug. Windchill probably should not have allowed you to use the internal name “Class” for your attribute.

 

 BTW, you could go into the dB and change the internal name from “Class” to something else.

 

David

Top Tags