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

How to create soft attribute with user picker?


How to create soft attribute with user picker?


I want do define a soft attribute "approver" for a certain document and the approver should be a PDMLink user.

When user creates the document, he should be able to select the approver from a list of PDMLink users.

As far as I understand, I need to write some code for a so called user picker and compile it.

There is an example for compiling a picker for organizations here.

However, I am not very familiar with customization and searching for someone who can explain, what to do.

I would like to know the following:

* Sample code with simplest callback function
(I attach a sample code from PTC Technical Support, but I guess this is too generic and does not work)

* How to compile

* How to register in Windchill if this is different as described in the article above

Sorry, but I am a beginner in this.

I would appreciate any help.



Hee hee...there is no attribute type for picking a user. I've tried, extensively, to find one and PTC has said no it doesn't exist. So you'll have to go to the Workflows instead.

Quick option would be in your Document workflow, immediately after the Start send a Submit task to the Creator but add Set Up Participants to it, and they can pick the reviewers and approvers on it. You may also want to put code in the Complete transition that will spit out a popup error if they set themselves as the Reviewers or the Approver, since self-approval is a conflict of interest.

Hope that helps,



You can create attribute of string type and create data utility to replace textbox with User picker. Below are the steps

  1. Write data utility by extending the com.ptc.core.components.factory.dataUtilities.DefaultPickerDataUtilityand override the setModelData method to specify the pickerConfig, following is an example


public void buildUserPickerConfig(final String component_id, final ModelContext mc) throws WTException {

           HashMap<String, Object> defaultProps = new HashMap<String, Object>();

           defaultProps.put("objectType", "");

           defaultProps.put("pickedAttributes", "name");

           defaultProps.put("readOnlyPickerTextBox", "false");

           defaultProps.put("showSuggestion", "true");

           defaultProps.put("suggestServiceKey", "OrgPicker");

           HashMap<String, Object> customProps = new HashMap<String, Object>();

           if ("Esclation".equals(component_id) ||"OrgAttribute".equals(component_id)) {

                 customProps.put("pickerId", component_id);

                 customProps.put("pickerCallback", "CustomPickerInputComponentCallback");





          2. Use attribute internal ID from the Type manager for the new IBA created and register the data utility in the file refer customizer guide for registering data utility


hope it helps !!




...Ugh...why didn't PTC tell me that?

5-Regular Member



Can you help me out where to register the callBack function jsp page name and location of it ?