Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Selecting multiple field values

Hi,

I'm looking to allow users to filter their selection based on the datetime ranges they specify. The dashboard has been developed to allow users to define up to ten datetime ranges.

As an example, let's say a user wishes to filter their data based on the following two datetime ranges they've input. (I've used the timestamp format 'YYYY-MM-DD hh:mm:ss'):

Range 1: 2015-02-16 17:00:00 to 2015-02-16 18:00:00

Range 2: 2015-02-16 19:00:00 to 2015-02-16 20:00:00

I've attempted to build a Search string that will work with the Select in Field button action (the field being "timestamp") but I'm finding that beyond a certain level of complexity, the Search string fails to apply any filtering the data. The point of failure appears to be when I incorporate 'less than' / 'greater than' operators into the Search string, instead of specifying only one value each side of the pipe.

Given the field value has a space between the date and time, I've included quotation marks around the values - which I've linked to variables - but this hasn't resolved the issue.

An example Search string that appears to be failing is as follows:

'(>=' & vStarttimestamp1 & '<=' & vEndtimestamp1 & '|' & '>=' & vStarttimestamp2 & '<=' & vEndtimestamp2 & ')'

Where:

vStarttimestamp1 = 2015-02-16 17:00:00

vEndtimestamp1 = 2015-02-16 18:00:00

vStarttimestamp2 = 2015-02-16 19:00:00

vEndtimestamp2 = 2015-02-16 20:00:00

The string works when I'm looking to filter across only dates (i.e. ignoring the time element) so it appears the datetime field is the cause of the issue.

Grateful for your thoughts.

Many thanks

Tom

0 Replies