Menu

Can a multi-select list field be set to required?

+1 vote

The multi-select field is working great but I would like to make it required.

I can easily set that on any other field. Why not on a multi-select field?

in Customization by (5.6k points)

1 Answer

0 votes

A multi-select field is not a real database field. Internally a multi-select field is implemented using one associate table and two database relationships. For more details see: Multi-Select Lookups

This means that there is no simple "Required" flag.

Require at least X Selections

There is two different ways to require a selection from a Multi-Select.

1) Use a Table Trigger to validate

One option is to use a table trigger and throw an error if there is not enough child selections.

2) Using a Stored Procedure to validate

A Store-Procedure is used to validate and save the record. The Procedure can perform any necessary validation and either raise an error (causing a roll-back) or it can fail to advance the status and set or return an error message.

This scenario is typical when the form is setup to be a Wizard. For more details see: Data Entry Wizard

by (58.2k points)
Welcome to the dbFront Q&A site, where you can ask questions and receive answers from other members of the community.
 | Minimalist Answer Theme by Digitizor Media
 |
Powered by Question2Answer
...