- Product: Voyager
- Relevant for Installation Type: Multi-Tenant Direct, Dedicated-Direct, Local, TotalCare
Provide some tips for using Conditionals in Voyager Prepackaged Access Reports.
Sometimes you might want your results to vary, based on some criterion. This is called a "Conditional".
In a programming language, a Conditional might look something like this:
if (sun is up) then
The IIf() Function ("Immediate IF") allows for conditionals in Voyager Prepackaged Access Reports.
Format: IIf (expr, truepart, falsepart)
If the expression, “expr” turns out to be true, the value of IIf is “truepart”. If the expression is not true, the value of IIf is “falsepart”.
Example: PH: IIf([PATRON_PHONE].[PHONE_NUMBER] Is Null,"NO PHONE",[PATRON_PHONE].[PHONE_NUMBER])
In the above call example, we want the phone number associated with each patron's permanent address. A phone number is not required, however, so we use an outer join, then we use an IIf() function to put "NO PHONE" in the results if there is no phone number.
Constructing custom SQL queries by request and troubleshooting unexpected results from customer-created SQL queries falls outside the scope of Support. The above has been posted for informational purposes. Voyager-L and Developer Network are useful resources for finding helpful custom SQL or obtaining assistance from peers in troubleshooting custom queries.
- Article last edited: 03-Mar-2021