Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to put together a criteria in an expression.
Essentially an OR case
Currently I have :
count({<Stream={'1'}>} CarNP)
I want to add where it is Stream 1 OR Colour like Red. As the cars maybe in Stream 1 or in another stream but have red within the colour field
count({<Stream={'1'}, Colour = {'*Red*'}>} CarNP)
Try this,
count({<Stream={'1'}> + <Colour = {'*Red*'}>} CarNP)
try
count({<Stream={'1'} and Colour = {'*Red*'}>} CarNP)
=count(if([Stream] = '1' OR 'Colour = '*Red*' , CarNP)) ;
=Count(if(Stream='1' or Colour like '*Red*',CarNP))
=count({<Colour={'RED'}>+< Stream={1}>}CarNP) works fine.
The suggestion by tamilarasu is the correct one. Some of the others will work, but will not be as quick. Others will not work at all.
I second that
Maybe it's also possible to use
=Count({<CarNP = p({<Stream={'1'}>}) + p({<Colour = {'*Red*'}>}) >} CarNP)
avoiding the union of two record sets