IF EXPRESSION

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
jromariz
Posts: 264
Joined: Wed Apr 03, 2002 6:00 pm
Location: Brasil

IF EXPRESSION

Post by jromariz »

Hi,

We are trying to use the "if" to tuneup a reply when outside of the expected range. Could you please validate the expression below, it does not work as we expected.

if ([('%SuggestedReply%' - '%SuggestedLastReply%') * 100 div 100000000] > 101) 100;else [('%SuggestedReply%' - '%SuggestedLastReply%') * 100 div 1000000000]

We would like that if teh expression 1 result is over 101, then the reply should be 100.

Thanks for helping.

Regards,

Jromariz.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You should remove [] from if-expression, use round brakets there.
if ((('%SuggestedReply%' - '%SuggestedLastReply%') * 100 div 100000000) > 101) 100;else [('%SuggestedReply%' - '%SuggestedLastReply%') * 100 div 1000000000]

Also I think "div 100000000" does not have any sense. Do you want to check if '%SuggestedReply%' - '%SuggestedLastReply% > 0.00000001?
Normally HostMonitor does not use 8 digits after dot for test results so such precision is impossible. Unless you are using some custom script :roll:

Regards
Alex
jromariz
Posts: 264
Joined: Wed Apr 03, 2002 6:00 pm
Location: Brasil

Post by jromariz »

Thanks a lot Alex,

That was exactly the problem!

Best regards,

Jromariz.
Post Reply