Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HEy,
I am having error in following script.
Can you tell me what is the error ??
I have to Sum the Duration for Event = Server_DOWN and (StartTime >= Downtime_StartTime) and (EndTime <= Downtime_EndTime)
Script :
=Sum({<Event = {'Server_DOWN'} and PurgeChar(Time(StartTime, 'hh:mm:ss'), ':') >= PurgeChar(Time(Downtime_StartTime, 'hh:mm:ss'), ':') and PurgeChar(Time(EndTime , 'hh:mm:ss'), ':') <= PurgeChar(Time(Downtime_EndTime , 'hh:mm:ss') , ':')> }Duration)
Thanks
At first change the and into comma so :
Sum({<Event = {'Server_DOWN'} , .... Duration)
the second condition must be written again unfortunately you cannot use functions (purgechar in this case) at the left side so you need to compute that value in the script, let's say myvalue. With these conditions the expression change into:
myvalue = {'$(>=PurgeChar(Time(Downtime_StartTime, 'hh:mm:ss'), ':')<=PurgeChar(Time(Downtime_EndTime , 'hh:mm:ss') , ':') )'}
=If(Event = 'Server_DOWN' and PurgeChar(Time(StartTime, 'hh:mm:ss'), ':') >= PurgeChar(Time(Downtime_StartTime, 'hh:mm:ss'), ':') and PurgeChar(Time(EndTime , 'hh:mm:ss'), ':') <= PurgeChar(Time(Downtime_EndTime , 'hh:mm:ss') , ':'), Sum(Duration))
Hey,
This is not working. What to do ??
Hi Nikhil,
Break it in small parts and make each small part work, else it will be difficult to find what's not causing it to work.
thanks,
Rajesh Vaswani
I used following script but still it is showing : 00:00:00
=Sum({<Event= {'Server_DOWN'} , KeyStartTime= {">= KeyDowntime_StartTime"}, KeyEndTime= {"<= KeyDowntime_EndTime"} >} Duration)
Any errors? Can you post sample app.
In script, don't use = before If
If(Event = 'Server_DOWN' and PurgeChar(Time(StartTime, 'hh:mm:ss'), ':') >= PurgeChar(Time(Downtime_StartTime, 'hh:mm:ss'), ':') and PurgeChar(Time(EndTime , 'hh:mm:ss'), ':') <= PurgeChar(Time(Downtime_EndTime , 'hh:mm:ss') , ':'), Sum(Duration))