Skip to main content
Jun 24, 2022 2:17 PM UTC
Question

How to get the display value for attribute

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

3 replies

Jun 29, 2022 6:10 AM UTC

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 

Jun 29, 2022 12:24 PM UTC

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?

Jun 29, 2022 1:02 PM UTC

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