Skip to main content
13-Aquamarine
June 24, 2022
Question

How to get the display value for attribute

  • June 24, 2022
  • 1 reply
  • 1782 views

WM_9965332_0-1656079961219.png

Hi all. I am trying to get the display value for attributes in windchill which are not of type "String". I am using PersistableAdapter to load the attribute value with the internal name but that is not user friendly for display. I have attached an example of values I get from Modified by attribute

1 reply

HelesicPetr
22-Sapphire II
22-Sapphire II
June 29, 2022

Hi @WM_9965332 

 

If you use an API in a DataUtility or wherever and you get a user ID then try to find the WTUser (Participanl).

From the WTUser object you can retrieve what you need.

 

PetrH 

13-Aquamarine
June 29, 2022

Thanks for the information, however this is for one attribute value. Is there a generic way to make sure all values are displayable for easy reading?

HelesicPetr
22-Sapphire II
22-Sapphire II
June 29, 2022

Hi @WM_9965332 

I don't know. 

Just check how all displayed attributes are processed in a system .

You realized that each attribute has own DataUtility which cares how the value is displayed.

 

So generally if you need to display attribute value you need to processed internal value to displayable form if the internal value is not in a user-friendly form.

 

If a general Datautility exists then you could use it but I don't believe in it. I've never found it. 

 

Maybe somebody else has a luck :D.

 

PetrH