Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
Would like to know whether we can have and OR condition in the Search in Field in the Action for Select in Field.
We have two main input boxes.
S1 FromTime, S1 ToTime
S2 Fromtime, S2 ToTime
We would like to use an action button which would filter the times and display times between 7:30 to 11:00 and 12:00 to 13:00 only.
I have the following expression in Select in Field - Search in Field
Field: log_datetimeindata_Hour_Min
Search String: ='>=' & Time(varS1FromTime) & '<' & Time(varS1ToTime) & ' OR ' & '>=' & Time(varS2FromTime) & '<' & Time(varS2ToTime)
I do not know how to use the OR condition to Filter the Time and tried of different approaches. Can someone help me with how I can achieve this.
Thanks.
Use as per below in search string
='(>=' & Time#(vStart1, 'hh:mm:ss') & '<=' & Time#(vEnd1, 'hh:mm:ss') & '|'
& '>=' & Time#(vStart2, 'hh:mm:ss') & '<=' & Time#(vEnd2, 'hh:mm:ss') & ')'
change variable names and time format accordingly.
Search string can be like below.
=if(isnull(var_name)=-1, expresion1, expression2)
I think you need a search string like
='=(log_datetimeindata_Hour_Min >= varS1FromTime AND log_datetimeindata_Hour_Min < varS1ToTime)
OR (log_datetimeindata_Hour_Min >= varS2FromTime AND log_datetimeindata_Hour_Min < varS2ToTime)'
May be this:
=If(Len(Trim(varS1FromTime)) > 0 and Len(Trim(varS1ToTime)) > 0, '>=' & Time(varS1FromTime, 'h:mm') & '<' & Time(varS1ToTime, 'h:mm'), Time(varS2FromTime, 'h:mm') & '<' & Time(varS2ToTime, 'h:mm'))
Use as per below in search string
='(>=' & Time#(vStart1, 'hh:mm:ss') & '<=' & Time#(vEnd1, 'hh:mm:ss') & '|'
& '>=' & Time#(vStart2, 'hh:mm:ss') & '<=' & Time#(vEnd2, 'hh:mm:ss') & ')'
change variable names and time format accordingly.
Swuehl,
Thanks for the response. I tried the expression - it is only filtering for S1 not for S2. I have 7:30-11 and 13:00 - 15:00 and it is only showing data from 7:30-11.
Sincerely,
Syed Jawwad Hussain
Sunny,
Thanks for the response. I tried the expression - it is only filtering for S1 not for S2 - just as Swuehl. I have 7:30-11 and 13:00 - 15:00 and it is only showing data from 7:30-11.
Sincerely,
Syed Jawwad Hussain
Manish,
Thanks a lot - it is working like a charm.