Skip to main content
12-Amethyst
February 21, 2024
Solved

Reference Type in custom Table

  • February 21, 2024
  • 1 reply
  • 2029 views

Hi All @HelesicPetr

 

I have a custom table(in a wizard popup by a custom action) which collects all the required dependents of the main EPM and lists them. In the table, I need to have a new column to display the Reference Type between  main EPM doc and the dependent EPM doc.

I tried data utility but I'm not able to get the main EPM doc into data utility as it's called only for each dependent doc. 

 

My requirement is to have a column for Reference Type where each component(row) displays their reference with the main epm Doc as shown in the attached pic.

 

Any idea or workaround?

MV_10441462_0-1708517177074.png

 

 

Best answer by RandyJones

See https://www.ptc.com/en/support/article/CS344421

You have not shown your existing code for your datautility however using the ModelContext parameter will get what you need I believe:

Object rmbObject = mc.getNmCommandBean().getActionOid().getRefObject();// the originally selected object

1 reply

20-Turquoise
February 21, 2024

See https://www.ptc.com/en/support/article/CS344421

You have not shown your existing code for your datautility however using the ModelContext parameter will get what you need I believe:

Object rmbObject = mc.getNmCommandBean().getActionOid().getRefObject();// the originally selected object

12-Amethyst
February 22, 2024

Thank you @RandyJones . Do you know how to get the Reference Type value to my custom table. I have two EPMs with CCP Reference Type, I want to have the same column in my custom table.

20-Turquoise
February 22, 2024

@MV_10441462 wrote:

Thank you @RandyJones . Do you know how to get the Reference Type value to my custom table. I have two EPMs with CCP Reference Type, I want to have the same column in my custom table.


You can use the EPMMemberLink method getDepType

int depType = epmMemberLink.getDepType();

Refer to this for what the types are:

https://support.ptc.com/help//wnc/r12.0.2.0/en/index.html?_gl=1*uofyig*_ga*MjAxNjMxMzc5My4xNjk1ODMwNTM1*_ga_CBN5QVB9VJ*MTcwODYyMDA1MC45NTcuMS4xNzA4NjI0NjAyLjAuMC4w#page/Windchill_Help_Center/ProEWCIntegCustInternalRelDisplayConfig.html