Checks for multiple code attributes not working properly on Collect Mobile

  • Asked
  • Active
  • Viewed 2647 times
0

Dear OF team

In our survey we have a multiple code attribute for selecting team members. In minimum there must be two team members, in maximum there three.

Therefore, we have an attribute team, where we have checked Multiple with Min count: 2, Max count: 3. In OF Collect Desktop, the validation of the restrictions works as supposed. However, in OF Collect Mobile there seems to be a bug for the validation.

I have tested the following cases:





Min count Max count validation min validation max
2 3 error warning only disappears after selecting-unselecting-selecting some items. not working
0 3 no error if NULL not working
NULL 3 NA not working


Best,
Christoph

0

Accepted answer

Dear Christoph,
We will investigate this issue and apply a fix in the next version of Collect Mobile if necessary.
Many thanks,
Open Foris Team

0

Accepted answer

There is a way I have achieved to suppress this warning for the example above: I have an entity plot/team_sampling_decision where I select the field-crew members (code-attribute team):

  • check Multiple as described above
  • add additional checks for min and max:
    min: count(parent()/team_sampling_decision/team) >= 2 and idm:not-blank($this)
    max: count(parent()/team_sampling_decision/team) <= 3

Note that the argument idm:not-blank is required since no error would be raised if no team-members are selected.

This solution currently works (Collect Mobile Version 1.7.9 [206]), but I don't know if there might happen unforeseen interactions of this double-validation in future versions...

Your answer

Markdown text. Shortcuts: Ctrl+B bold, Ctrl+I italic, Ctrl+K link, Ctrl+E code, Ctrl+Shift+V paste as plain text. Tab indents list items and code; press Escape, then Tab, to leave the text box.

Insert an image

Say what the image shows, for people who can't see it.

Tip: type a few words from the error message, or put a tag in [brackets] to look only there.

Menu

Keyboard shortcuts

Anywhere

?
Show this list
/
Search
g h
Go to the home page
g q
Go to the questions
g t
Go to the tags
g u
Go to the users
a
Ask a question

Lists of questions

j k
Next or previous question
Enter
Open the question

Question pages

j k
Next or previous post

Shortcuts never apply while you type in a text field. Members can turn them off in their preferences.