Skip to main content
14-Alexandrite
January 2, 2023
Solved

Windchill attribute for user look-up

  • January 2, 2023
  • 2 replies
  • 2197 views

Hello,

 

I have a requirement where I need to introduce an attribute to an object type which should allow users to look up Windchill users and add them as a value for that attribute, I would use this value and populate the team members for that object. Requesting you to shed some light on the possible solution.

 

Thanks,

Hari

Best answer by joe_morton

I believe there is a back-end way to do a bulk load. You could use that for the initial. I haven't done it myself, but my colleague has. Try these references: 

For us now, we maintain the list by just manually updating it (as there is only a few users added or removed at a time).

 

2 replies

joe_morton
18-Opal
18-Opal
January 3, 2023

We maintain an enumerated list of users in our system that can be assigned to a particular attribute. In our case, only one can be selected. In your case, it sounds like you would want to make it a multi-valued attribute. 

 

The up-keep is significant. We have to add to the enum list when we get new users and remove when users are no longer valid. We do have workflows that query the username assigned in that attribute, and then can route a task to that user. This also requires logic to ensure the user is still valid, and we need to catch the case that they are no longer valid.

 

I'd be interested to hear if you find a more elegant solution!

Sha1114-AlexandriteAuthor
14-Alexandrite
January 4, 2023

Hello @joe_morton ,

Can you let me know how do you populate the enumeration with the list of users? Is it something that we have to do manually or can we configure this in anyway?

 

 

joe_morton
18-Opal
18-Opal
January 4, 2023

I believe there is a back-end way to do a bulk load. You could use that for the initial. I haven't done it myself, but my colleague has. Try these references: 

For us now, we maintain the list by just manually updating it (as there is only a few users added or removed at a time).

 

HelesicPetr
22-Sapphire II
22-Sapphire II
January 4, 2023

Hi @Sha11 

You can create own DataUtility to populate a comboBox with users what you need or you can use a sugestionTxtBox.

 

In my video there is example how very simple search for a user can work

 

for suggestion I use com.ptc.core.components.rendering.guicomponents.SuggestTextBox

and suggestionHelper com.ptc.core.components.suggest.Suggestable

and suggestion helper is defined as a service in service.properties

 

 

PetrH