# How to define multiselect fields

**URL:** <https://forum.litium.com/t/how-to-define-multiselect-fields/973>\
**Category:** Questions\
**Created:** [July 8, 2019, 2:42pm UTC](https://forum.litium.com/t/how-to-define-multiselect-fields/973 "2019-07-08T14:42:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MariliaBognandi](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@MariliaBognandi](https://forum.litium.com/u/MariliaBognandi)\
**Post date:** [July 8, 2019, 2:42pm UTC](https://forum.litium.com/t/how-to-define-multiselect-fields/973/1 "2019-07-08T14:42:34Z")

</div>

Our client needs several product fields that are both filters and multiselect. I have defined them in ProductFieldDefinitionSetup.cs:

```
            new FieldDefinition<ProductArea>("NewField", SystemFieldTypeConstants.TextOption)
            {
                CanBeGridColumn = true,
                CanBeGridFilter = true,
                Option = new TextOption
                {
                    MultiSelect = true,
                    Items = new List<TextOption.Item>
                    {

                    }
                }
            },

```

as you can see I have skipped defining the Options, added them in back office and this actually works. However, do I need to define this field anywhere else (ProductItemViewModel.cs and ProductItemViewModelBuilder.cs for example)?

Litium version: 7

---

<div class="post-metadata">

**Author:** ![steve.redstorm](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/steve.redstorm/32/14_2.png) [@steve.redstorm](https://forum.litium.com/u/steve.redstorm)\
**Post date:** [July 8, 2019, 3:03pm UTC](https://forum.litium.com/t/how-to-define-multiselect-fields/973/2 "2019-07-08T15:03:47Z")

</div>

Do you add it to a ProductFieldTemplate manually in BO?

---

<div class="post-metadata">

**Author:** ![MariliaBognandi](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@MariliaBognandi](https://forum.litium.com/u/MariliaBognandi)\
**Post date:** [July 8, 2019, 3:17pm UTC](https://forum.litium.com/t/how-to-define-multiselect-fields/973/3 "2019-07-08T15:17:49Z")

</div>

Yes exactly, cus we don’t know all possible options yet.

---

<div class="post-metadata">

**Author:** ![steve.redstorm](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/steve.redstorm/32/14_2.png) [@steve.redstorm](https://forum.litium.com/u/steve.redstorm)\
**Post date:** [July 9, 2019, 9:48am UTC](https://forum.litium.com/t/how-to-define-multiselect-fields/973/4 "2019-07-09T09:48:01Z")

</div>

If you need to show the value from the field (visible on site) then you need to implement it of course everywhere it is required.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [August 6, 2019, 9:48am UTC](https://forum.litium.com/t/how-to-define-multiselect-fields/973/5 "2019-08-06T09:48:08Z")

</div>

Closed on August 6, 2019, 9:48am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
