Valid if Selection Restriction for Enumlist

Hi All,

Good day.

I currently have a form and for the enumlist field I would like to do 2 things

  • Allow users to search within the dropdown list but not be able to add new values. An example would be something like this:

  • Restrict the numbers of selection they can make depending on another field. So depending on the value in Number of Pax, they can only select that certain amount specified.

    I have done this by inputting “COUNT([_THIS]) <= [Number of Pax]” in the ValidIf settings.

    However if I try to combine my 2 expressions for the ValidIf, I am unable to get it to work as my sub expression provides a list instead of a Yes/No.
    My attempted sub expression is: AND (COUNT([_THIS]) <= [Number of Pax], Employee [Name])

    Is there a way for us to combine both requirements together? Thank you in advance for your assistance.

    -Minguri

An easier workaround can be to split the valid_if into two parts.

  1. In the [Addditional Staff Names] valid_if you can have Employee [Name]

2. In some other suitable nearby column in the form that does not have its own valid_if, you can include a valid_if condition of COUNT([Addditional Staff Names])<= [Number of Pax] with a suitable valid_if error message.

  1. Alternative for point 2 above, you could include a show column of text type just below the [Addditional Staff Names] column with show if as COUNT([Addditional Staff Names]) > [Number of Pax] with an error message that “Number of staff names exceeds number of pax”.
3 Likes

Hi @Suvrutt_Gurjar ,

Apologies for the late follow up but thanks alot once again! I followed your suggestion and created a virtual column for the valid_if condition. So now the error message is showing accordingly to how I want it to be! :grinning_face:

2 Likes