Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have created scripting error where my statement is IF(EvType= 15 AND EvParam1 > Lookup('SystemResponseTime','%MailBoxID',EvMailBoxID,'MailBox'), 'Not met Service Level', 'Met Service Level' ) AS ServiceEventLevelStatus, well you can imagine the part not Met Service level is correct however, For met service level I only want it so that IF(EvType= 15 AND EvParam1
I got it and it was my mistake this is what I wanted My apoligies for the confusion
IF(EvType= 15, IF (EvParam1 > Lookup('SystemResponseTime','%MailBoxID',EvMailBoxID,'MailBox'), 'Not met Service Level', 'Met Service Level')) AS ServiceSLA,
I understand it is doing an else for all evTypes, I just need it for evType 15. Thank You in advance.
Is "15" a number or text? Table Viewer window > highlight over field > text or int/num? All is spelled correctly (case sensitive)? Perhaps use ( ) parenthesis to control the logic block.
Number
tinyint to be exact in the db
trying it but don't know where to block it up getting errors all around
I need to do it only for evtype 15 not the other evtypes, current with this statement IF(EvType= 15 AND EvParam1 > Lookup('SystemResponseTime','%MailBoxID',EvMailBoxID,'MailBox'), 'Not met Service Level', 'Met Service Level' ) AS ServiceEventLevelStatus,
I am getting the correct results for 'Not met Service level" but for met Service level it is showing that for all evTypes , However I just need it for evType 15
Just for clarification...
IF(EvType= 15 AND EvParam1 > Lookup('SystemResponseTime','%MailBoxID',EvMailBoxID,'MailBox'), 'Not met Service Level', 'Met Service Level' )
Translates to:
if
EvType = 15
AND
EvParam1 > "some number"
if True => 'Not met Service'
if False => 'Met Service level'
*** if no value found in Lookup - the value is Null.
Have you done a simple test of your Lookup logic to make sure that works alone (without If)?
Can try if( (EvType=15) AND (EvParam1>Lookup()), true, false
nope no null values, however if I switch the operators then it is still correct Current My express Translates to: if EvType = 15 AND EvParam1 > "some number" if True => 'Not met Service' if False => 'Met Service level' However I want it to show Translates to: if EvType = 15 AND EvParam1 > "some number" if True => 'Not met Service' if False => EvType = 15 AND EvParam1 > "some number"
= ' Met service level '
Your False logic is including EvTypes other than 15, even though you specified that logic in the If clause?
Perhaps consider using: an inline table or use 0 and 1 to test logic successfully, or use set analysis for the expression instead.