I have a field in a form called “Code”. That field is Dialog List field that allows multi-values and uses a View for selection.
I don’t want the users to be able to just type in a value not in the list.
I thought the best way would be a field exit formula. How do I write it to account for the fact there might be multiple values in the field?
Thanks in advance.
Subject: Help with MultiValue Field
On the 2nd tab of the field properties in designer, do you have “Allow values not in list” selected? If so, uncheck it. Then they can’t select what’s not there.
Subject: RE: Help with MultiValue Field
Thanks Sam but with a Dialog list that option is grayed out (not checked, just grayed out).
The user can type anything into the field without even selecting the drop down.
Subject: RE: Help with MultiValue Field
On the second tab of the field, you select how the list is generated- “Enter Choices One Per Line” (for hard coded choices) or “use formula” for dynamic coding- once you fill that out, they will not be able to put in their own choices- make sure you do allow multiple values.
Subject: RE: Help with MultiValue Field
Thomas is right.
Change it to “use formula” and then use @DbColumn to lookup the column in the view. The end users will not be able to type into the field as long as you don’t check the box below the formula.
Subject: RE: Help with MultiValue Field
That does work but the only disadvantage is that the user only sees that one column and not the rest of the view which means they have to know what the code stands for. I think I can get around that by putting a legend on the form.
One last question however, how can I easily check the multi value fields when they submit.
For example I want to check code_1 when they submit to check to see if “SI” is among the values. If if is I want to make sure they indicated how many sick hours they took.
Thanks again.
Subject: RE: Help with MultiValue Field
Try using @Picklist - it will show more of the view.
In the Querysave, you can write some validation.
If code_1 contains “SI” then
if sick hours is “” then
msgbox “please record the number of sick hours”
exit sub
I’d write it in LotusScript.