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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Translate the entire conversation x

Attribute Multi-Value & Custom Picker Options

BF_13811900
9-Granite

Attribute Multi-Value & Custom Picker Options

I have configured one of my attributes within a custom sub-type to make use of a picker. The picker works fine and some of the code used within the java file for this picker can be seen below:

 

HashMap<String, Object> defaultProps = new HashMap<String, Object>();
defaultProps.put("objectType", "wt.part.WTPart");
defaultProps.put("pickedAttributes", "number");
defaultProps.put("multiSelect", "false");
defaultProps.put("showPartType", "ActiveOnly");
defaultProps.put("readOnlyPickerTextBox", "false");
defaultProps.put("showSuggestion", "true");
defaultProps.put("suggestServiceKey", "DocPartPickerId");
defaultProps.put("label", "Search for Part");
defaultProps.put("pickerTitle", "Search for Part");

 

The attribute I am making use of is a global attribute and has no constraint enabled on it to make it "Single-Valued".

 

I would like to make my attribute to display adjacent to a "+" icon so that I can associate multiple values with it. However, inclusion of the picker seems to remove this icon. But, if I change the line of code "defaultProps.put("multiSelect", "false");" featured above to have a value of "true", I can no longer select the small magnifying glass which sits next to the attribute field and activates the picker window. However, it does result in the + icon being displayed next to my attribute field which can be used to associate multiple values to my attribute.

 

Does anyone know if anything can be done to allow me to add more attribute values to an attribute whilst simultaneously making use of the picker functionality to choose each values? In other words, to display the small + icon associated with multi-value attributes and the small magnifying for the picker in my attributes layout?

1 REPLY 1

Hi @BF_13811900 

Thank you for your question. 

Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.

Also, feel free to add any additional information you think might be relevant. It sometimes helps to have screenshots to better understand what you are trying to do.

 

Best regards,


Catalina
PTC Community Moderator
PTC
Announcements

Top Tags