Filter using a list

I can filter on multiple values using

 -> filter("measurementName" = 'SSP2-4.5 (medium confidence)' or
			"measurementName" = 'SSP5-8.5 (medium confidence)' or
			"measurementName" = 'SSP2-4.5 + VLM (medium confidence)' or
			"measurementName" = 'SSP5-8.5 + VLM (medium confidence)')

but does riskscape have an operator that lets me compare to a list?

eg

 -> filter("measurementName" in {'SSP2-4.5 (medium confidence)', 
								 'SSP2-4.5 (medium confidence)',
								 'SSP2-4.5 + VLM (medium confidence)',
								 'SSP5-8.5 + VLM (medium confidence)'})

Hi John,

Take a look at the switch() function in the beta plugin . E.g.

filter(switch(measurementName,
              default: false,
              cases: [{ in: ['SSP2-4.5 (medium confidence)', 
                             'SSP5-8.5 (medium confidence)'],
                        return: true }]))
1 Like

An in operator or function is a nice idea though, John, I’ll add a ticket to the backlog

:+1: