Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi,
I have a custom attribute. Using Data Utilty I made the attribute multivalued.
The attribute is supposed to be a User Picker.
I can not see User Picker(code written/datautility id registered/cache cleared)
Is it because we cannot have two Data Utility functions for the same attribute(Multivalued and Picker)?
What if you add a multiSelect as true?
public void buildUserPickerConfig(final String component_id, final ModelContext mc) throws WTException { HashMap<String, Object> defaultProps = new HashMap<String, Object>(); defaultProps.put("objectType", "wt.org.WTUser"); defaultProps.put("pickedAttributes", "name"); defaultProps.put("multiSelect", "true"); defaultProps.put("showUserType", "ActiveOnly"); defaultProps.put("readOnlyPickerTextBox", "false"); defaultProps.put("showSuggestion", "true"); defaultProps.put("suggestServiceKey", "DocUserPickerId"); defaultProps.put("label", "Search for User"); defaultProps.put("pickerTitle", "Search for User"); HashMap<String, Object> customProps = new HashMap<String, Object>(); if ("RDSupportEngineer".equalsIgnoreCase(component_id)) { customProps.put("pickerId",component_id); customProps.put("pickerCallback", "CustomPickerInputComponentCallback"); } defaultProps.putAll(customProps); mc.getDescriptor().setProperties(defaultProps); }
Adding multiselect true lets me have more than one users at a time. But the requirement is to have a multi value i.e. to have individual users.. that shall be mapped to their respective attributes.
With pickedAttributes I am unable to specify multiple attributes to be fetched and displayed as mentioned in help center.
Following is the line of code I added for it :
PickerRenderConfigs.setDefaultPickerProperty(map, "pickedAttributes",
"name, number,longDescription.formattedText");
Is there anything wrong in the syntax. Or is there something else to do as well ?