# Using multiple relevant values

**URL:** <https://forum.getodk.org/t/using-multiple-relevant-values/1831>\
**Category:** Support\
**Created:** [December 15, 2012, 10:57am UTC](https://forum.getodk.org/t/using-multiple-relevant-values/1831 "2012-12-15T10:57:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon\_Parsons](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@Jon\_Parsons](https://forum.getodk.org/u/Jon_Parsons)\
**Post date:** [December 15, 2012, 10:57am UTC](https://forum.getodk.org/t/using-multiple-relevant-values/1831/1 "2012-12-15T10:57:32Z")

</div>

Hi

I am creating quite a complex wildlife hunting form and I am using the  
relevant column and the parameter of selected(${species-1-y-n}, 'yes') to  
only show relevant questions based on previous answers

Its a great feature but I want to use two of them together and cant see how  
to do it. The reason is I am asking a yes/no question to see if species are  
getting scarcer and then showing different sets of questions based on the  
answer. But then I have a further question down one of these question paths  
that I want to as for first, second and third species with a second yes no  
value between that I will be using to only show related questions if a  
second or third species has been entered.

So will need to use two values together and no matter how I try I get an  
error in conversion eg

selected(${scarce-species-y-n}, 'yes') selected(${species-1-y-n}, 'yes')

selected(${scarce-species-y-n}, 'yes')(${species-1-y-n}, 'yes')  
selected(${scarce-species-y-n}, 'yes' ${species-1-y-n}, 'yes')

Any ideas on how to use two of these values together - or a better way of  
allowing people to select their top 5 most scarce species but then  
identifying how many have been entered so further questions can be asked  
about just the ones entered.

Help appreciated

Jon

---

<div class="post-metadata">

**Author:** ![gaetano](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/g/b9e5f3/32.png) [@gaetano](https://forum.getodk.org/u/gaetano)\
**Post date:** [December 15, 2012, 7:29pm UTC](https://forum.getodk.org/t/using-multiple-relevant-values/1831/2 "2012-12-15T19:29:26Z")

</div>

You can use 'and' and 'or' to connect conditions, for example,

( selected(${scarce-species-y-n}, 'yes') and  
selected(${species-1-y-n}, 'yes') )

These can be nested using parentheses to ensure order or evaluation.

> **···**
>
> On Sat, Dec 15, 2012 at 2:57 AM, Jon Parsons wrote: \> Any ideas on how to use two of these values together - or a better way of \> allowing people to select their top 5 most scarce species but then \> identifying how many have been entered so further questions can be asked \> about just the ones entered.

---

<div class="post-metadata">

**Author:** ![Mitch\_S](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/m/3ec8ea/32.png) [@Mitch\_S](https://forum.getodk.org/u/Mitch_S)\
**Post date:** [December 17, 2012, 5:24pm UTC](https://forum.getodk.org/t/using-multiple-relevant-values/1831/3 "2012-12-17T17:24:39Z")

</div>

This page [http://opendatakit.org/help/form-design/binding/](http://opendatakit.org/help/form-design/binding/)  
covers the expression syntax and the functions that are available.

> **···**
>
> On Sat, Dec 15, 2012 at 11:29 AM, Gaetano Borriello \< gaetano@cs.washington.edu\> wrote:
> 
> > You can use 'and' and 'or' to connect conditions, for example,
> > 
> > ( selected(${scarce-species-y-n}, 'yes') and  
> > selected(${species-1-y-n}, 'yes') )
> > 
> > These can be nested using parentheses to ensure order or evaluation.
> > 
> > On Sat, Dec 15, 2012 at 2:57 AM, Jon Parsons [j.parsons@globalcanopy.org](mailto:j.parsons@globalcanopy.org) wrote:
> > 
> > > Any ideas on how to use two of these values together - or a better way of  
> > > allowing people to select their top 5 most scarce species but then  
> > > identifying how many have been entered so further questions can be asked  
> > > about just the ones entered.
> > 
> > --  
> > Post: [opendatakit@googlegroups.com](mailto:opendatakit@googlegroups.com)  
> > Unsubscribe: [opendatakit+unsubscribe@googlegroups.com](mailto:opendatakit+unsubscribe@googlegroups.com)  
> > Options: [http://groups.google.com/group/opendatakit?hl=en](http://groups.google.com/group/opendatakit?hl=en)
> 
> --  
> Mitch Sundt  
> Software Engineer  
> University of Washington  
> [mitchellsundt@gmail.com](mailto:mitchellsundt@gmail.com)

---

<div class="post-metadata">

**Author:** ![famador](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/famador/32/8770_2.png) [@famador](https://forum.getodk.org/u/famador)\
**Post date:** [February 10, 2020, 10:05pm UTC](https://forum.getodk.org/t/using-multiple-relevant-values/1831/4 "2020-02-10T22:05:58Z")

</div>

Great.  
This is usefull to:  
\*Call a group for diferent conditions.  
\*Compact a selections of diferentes variable.

select\_multiple: ( selected (${variable},'estado') or selected (${variable},'limpieza'))  
select\_one: (${variable}='estado' or ${prueba}='OK').

Thanks 🙂.
