Forum Discussion
With the data you gave in the example, if you use this expression:
["Secretery", "Architect"].indexOf($Position) != -1
in the Filter snap, it will only return documents which have “Secretery” or “Architect” as the value at $Position
There are a number of expressions you could use to do this, if you want to use one that is safe to use if the field ‘Position’ is optional you can use this expression as well:
$.get("Position") == "Architect" || $.get("Position") == "Secretery"
Or just simply replace the $Position
in the first expression with $.get("Position")
to make the first expression null safe as well. Just wanted to give some options for what makes sense to you in your case.
Thanks @cjhoward18
I did initially look at this kind of solution however not all secretary are given a position of secretary some may be assistant or receptionist. the other problem is that not all secretaries report to architects.
If i was to write a script i would iterate through the document filtering firstly on architects and add them to a seperate list then if they have a secretery ID I would append those secretaries to that list.
Im wondering if this can be done without the script snap though as I would prefer to use the out the box components to make the support aspect of this easier however it may be a case that script is the simplest way to go