I have this template for a composite column used for sorting in one VL/view manager view.
Code:
program:
## This one checks that #kobostatus has a value. If it does, return 'no' if it matches two specific criteria, and 'yes' otherwise.
if
$#kobostatus
then
switch_if(
'\[(Add|Send) to Device\]' in $#kobostatus, 'No',
$#kobostatus=='[Kobo Store]' && !$#kobodate, 'No',
'Yes'
)
fi
Functionally, this
should do the same thing:
Code:
program:
## This returns an empty if #kobostatus doesn't have a value. Other lines are unaffected.
switch_if(
!$#kobostatus, '',
## Alternate: $#kobostatus=='',
'\[(Add|Send) to Device\]' in $#kobostatus, 'No',
$#kobostatus=='[Kobo Store]' && !$#kobodate, 'No',
'Yes'
)
Would either of them be particularly faster?