I have a custom value list, that is being displayed as a set of checkboxes. How can I set the default value of all of the checkbox selections as a 1 or checked?
Use filed definitions:
set data to the value you want to have selected by default or use calculated value like:
PS: You can select all values by default with calculated value: ValueListItems ( Get ( FileName ) ; "YOUR VALUE LIST" ). So if you update your value list, no worries about updating your custom preselection.
Set the field to have an auto enter value of all the items you want checked in the form of a CR delimited list.
A checkbox set with the options RED, YELLOW, BLUE, GREEN and the default value should be RED and BLUE the auto enter data would be.
Both checkboxes will be checked. You could also use a set field in a script or a number of other options.
Hi Nick and opotoc, thanks for the help but not quite sure what you are suggesting I do.
The field is a text field named AvailSizes, the control style is Checkboxt set and the value list for the checkbox is a custom value list called Sizes2 with values "XS", "S","M", "L","XL".
I tried entering in the Auto-Enter Data section and the Calculate value section:
And tried entering in the Auto-Enter Data section and the Calculate value section:
Also tried entering in the Auto-Enter Data section and the Calculate value section:
I'm sure I'm missing something easy in your instructions.
laguna92651 wrote: And tried entering in the Auto-Enter Data section and the Calculate value section: List("XS";"S";"M";"L";"XL")
That is a correct solution. Once you have that in place, you should see all the listed values checked when you create a new record.
Another option is to auto-enter a calculated value =
ValueListItems ( Get (FileName) ; "YourValueListNameHere" )
This has the advantage of storing the actual values in one place only.
Thank you, the ValueListItems ( Get (FileName) ; "Sizes2" ) works. However it only works when I use the New Record button on the toolbar, if I have a script that uses New Record/Request, there is no default value, checked, entered. Is there something else I should add to the script to get the default values entered?
Something is missing from your description. A new record is a new record - I cannot think of a reason why an auto-enter would not take place.
I have to agree with Michael on this one. I have never encountered this myself and just tried everything I could think of to duplicate the problem. Auto Enter should work the same no matter how the record is created. Do you have something else in the script that changes this field?
All is well, my fault, I had left a Set Field in the script that I had added when I was initially trying to figure out how to set the defaults. Thanks for the help, working great.
What happens in that case? do multiple dots confuse filemaker the way it used to confuse Windows?
Retrieving data ...