Multiples values on a field

Is it possible to store multiples value on a field? For example I would like to store both values 9 and 10 on a field and still keep them as one variant.

Litium version: 7

Use TextOption or IntOption FieldType .

OK, I noticed now that it also supports multivalue. Can I set that property when I am creating the fielddefinition from code? I can see that the value is stored in the jsonValue property.

You can create a MultiField that contains your int field and set that the multi field should be an array, they you can add multiple values for the same field. Included in Litium 7.1 for PIM.

1 Like

Tried that and found something that looks like a bug, reported it as #44951

I have tested with the IntOption alternative, and I can create it with the MutliSelect = true so that’s fine. But when I’m using AddOrUpdateValue it only updates the value, not adding as another value. Bug or expected behavior?

Are you trying to add the value as a single int or as an List<int>?

Ah, I added it as a normal int, changed to List<int> and it works fine. Thanks,