Drop-down list and Tags in NERM

Is there any way to have multivalued attributes by selecting them from a catalog?
I mean, I want to use something like the “tag” attribute type but the user should not type the items but select them from a catalog (like a dropdown list).
Is it possible to do this?

1 Like

I don’t think tags will help you here but what you can do is create a drop down list and all the options in it.

After that, use the API endpoint //ne_attributes to get the id of the attribute and then using this id, PATCH the attribute with body

{
“ne_attribute”: {
“allow_multiple_selections”: true
}
}

using endpoint /ne_attributes/:id:

Once done, you should be able to add multiple options, see below:

image

2 Likes

Thank you very much for the solution, I will try to apply it to my attribute.
Greetings!

Hello, @sunnyajmera

I have changed the configuration through the API and in the workflow it lets me see the available options and lets me select multiple items.
However, when the profile is created, that attribute is empty, and if I try to edit it directly in the profile, the configuration is saved but remains empty.
If I return the configuration to :
“allow_multiple_selections”:false
It works normal and saves the value, but I lose the ability for it to be multivalued.

Am I missing something?

Thanks in advance.

I would advise against setting the “allow_muliple_selections” key to true for unsupported attributes. As seen, it will not have the desired effect.

  • Check boxes and Tags support selecting / setting multiple values in the attribute.
  • Contributor Searches allow for multiple selections (But that is for Users, not really what you want here)
  • Profile Search / Select attributes allow for multiple selections as well.

If you need to define a list of, say over 50, options (that may change) that a User can select multiple values from: I would suggest that you actually setup and use a Profile Search or Profile Select attribute. You would set up a new Profile Type and each Profile you create under that would be your “items”.

Under 50 options, I think Checkboxes display OK to be used.

1 Like

No, I am seeing the same behavior, and I haven’t been able to figure out a way to pass selected options across forms to store the value in another attribute of type tag which is supported for multiple selection. So, may be what Zach is saying is what you will have to do.

I will let you know if I find any other workaround.

1 Like

Thank you both for your support.
For the moment I will implement the solution of Zachary to advance in my tests, but anyway if I write if I know how to make the “Dropdown” attribute accept multiple values.