This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:create:filter-boolean [28.11.2014 13:37] – [Check If a Selection has the One OR Another Value] alexander.ritter | en:create:filter-boolean [07.12.2023 12:31] (current) – Nested Filters empschul | ||
---|---|---|---|
Line 8: | Line 8: | ||
* Does the participant usually buy -- according to a multiple-choice -- chocolate **and** dairy products? | * Does the participant usually buy -- according to a multiple-choice -- chocolate **and** dairy products? | ||
- | So-called | + | These " |
* The AND operator ('' | * The AND operator ('' | ||
Line 97: | Line 97: | ||
- | If the values are not linked, then each condition can be looked | + | If the values are not linked, then each condition can be called |
<code php> | <code php> | ||
Line 192: | Line 192: | ||
} else { | } else { | ||
goToPage(' | goToPage(' | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== Nested filters ===== | ||
+ | |||
+ | Sometimes it makes sense to set a filter in another filter. Let's take the situation where, depending on the answer to FF01, either question FF02 or FF03 was displayed. And now, depending on these two questions, another filter should follow. The individual filters would be simple: | ||
+ | |||
+ | <code php> | ||
+ | if (value(' | ||
+ | replace(' | ||
+ | } else { | ||
+ | replace(' | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | <code php> | ||
+ | if (value(' | ||
+ | replace(' | ||
+ | } else { | ||
+ | replace(' | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | But now only one of these two filters should become active ... depending on which value FF01 had. To do this, these filters are placed " | ||
+ | |||
+ | <code php> | ||
+ | if (value(' | ||
+ | // Filter für FF02 | ||
+ | if (value(' | ||
+ | replace(' | ||
+ | } else { | ||
+ | replace(' | ||
+ | } | ||
+ | } else { | ||
+ | // Filter für FF03 | ||
+ | if (value(' | ||
+ | replace(' | ||
+ | } else { | ||
+ | replace(' | ||
+ | } | ||
} | } | ||
</ | </ |