Hierarchical code lists - Hide level if no sublevels

  • Asked
  • Active
  • Viewed 3754 times
0

Hi all,

I am not sure if this has been answered somewhere already, but I have a complex hierarchical code list. Some level1 categories DO NOT have any additional categories on level2 (or level3). Which Xpath syntax do I use to define that the level2 code attribute field stays hidden if the selected category on level1 does not have any additional (sub-)categories? I know I could work with the specific code value (e.g. code_list1=3 or codelist1>2 ), but as my code list is complex, a general expression (i.e. "if level2 is empty" then do not show...) would be more appropriate.

Does anybody have an idea how to do this?

Thanks in advance!!

Alex

1

Accepted answer

Dear Alex,
This is actually a feature we were already taking into consideration...!
In the Survey Designer we could add an option like "hide with empty items" or something like that.
We will include this feature in one of the next release of Collect, please check the changelog to see if it has been implemented or not when a new version is released.
Thanks,
Open Foris Team

0

Accepted answer

Hello OF Team,

I am wondering if this change has been implemented. I have a similar scenario using a hierarchical code list where not every Level1 category has multiple level2 categories, meaning that a certain selected value for level1 should result in only one option for level2. When only a single level2 category exists within a level1 category, I would like this value to automatically populate. Is this possible with the current version of Collect?

Thank you! Bryant

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.