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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Adding columns to subscriptions table

TG_10272716
12-Amethyst

Adding columns to subscriptions table

Version: Windchill 12.1

 

Use Case: I am trying to add new calculated attributes to the table "Subscriptions" on the Windchill homepage.


Description:

My idea was to first add these new attributes to the type "wt.notify.NotificationSubscription" and then override the subscriptions-table and add these attributes via code.

 

However, I ended up in a quite confusing situation - the elements in this table are of type "com.ptc.core.subscription.subscriptionObjects.NmCompositeSubscription" which is not available in the Type & Attribute management. But when opening elements of this table they are suddenly of type "wt.notify.NotificationSubscription".

 

The problem is, that I thus cannot add these new attributes, as only the type NotificationSubscription is available in the Type & Attribute Management but apparently this is not the underlying type the table uses.

 

Meaning, that the table does not show any values for these new attributes, but when opening such an element in the table these attributes are then displayed (with valid values) on the info page of the element

 

Has anyone encountered this issue yet or knows a solution, or am I missing something?

 

Thanks in advance and best regards!

ACCEPTED SOLUTION

Accepted Solutions

I was able to solve the problem myself, what I did was to define a target for the column, meaning:

myColumn.setTargetObject("oid.refObject")

where myColumn is the ColumnConfig and oid.refObject references to the method chain .getOid().getRefObject() of the tables object type (NmCompositeSubscription) which deliveres the correct type (NotificationSubscription).

 

I hope this is helpful

View solution in original post

1 REPLY 1

I was able to solve the problem myself, what I did was to define a target for the column, meaning:

myColumn.setTargetObject("oid.refObject")

where myColumn is the ColumnConfig and oid.refObject references to the method chain .getOid().getRefObject() of the tables object type (NmCompositeSubscription) which deliveres the correct type (NotificationSubscription).

 

I hope this is helpful

Announcements


Top Tags