Auto selecting the filtered options

I want to auto select only the options that has passed the filter constraint by default. Is it possible? Thanks.

hi @nz000, please can you be detail as to what you mean by auto select. if possible can you share a sample file and explain what should happen when an action is taken.

thanks
fabla2020@gmail.com

I meant select a checkbox by default.

I'll explain a scenario.
Suppose, a question has 10 options with filters of 1 through 10. We apply a choice_filter to show only the options having filter greater than 5. So, the form would now show options with filter value 6,7,8,9,10. I want to be able to select all these 'filtered' options by default. Obviously the scenario could change, and be flexible to be used on a dynamic list.

Also I was playing around with 'appearance' column. I like the 'label' options, but it shows in horizontal scale. I rather want it to remain the same only without the check boxes. I'm on a phone so can't create a sample file. But I think I've explained well.

since i cannot see what exactly your form look like, there is a constraint to the question which is restricting the other options from appearing. you can check on your constraint to remove the restriction. or to make it cover the other options.

Hi Fabla, I've attached a sample xlsForm.test2.xlsx (12.9 KB)

In that form there are two multiple select, I want to be able to auto select the options by default (whichever passes the constraint). Note the constraint are randomly generated.

I cannot put the default values, as the options are dynamic.

You can't set dynamic defaults that users can then modify. Is that what you're trying to do? We are working on some extensions to the form specification which will make that possible eventually -- https://github.com/opendatakit/xforms-spec/pull/155

What you can do is show the random result in a label, see the random value once the form is submitted or create constraints based on the random result.

Yes, one workaround would be to select everything by default, and then calculating on the backend to find the set of options based on the random value. Not elegant, but does the job. Thanks.