FIND IPRange WHERE IPRange.IP = LoginNotification.RemoteAddress
IF SEARCH_COUNT = 0 THEN
CREATE AccessLog WITH AccessLog.DevicePlatform=LoginNotification.DevicePlatform,AccessLog.ReferringURL=LoginNotification.ReferringURL,AccessLog.RemoteAddress=LoginNotification.RemoteAddress,AccessLog.SessionId=LoginNotification.SessionId,AccessLog.UserName=LoginNotification.LoginName,AccessLog.isGuest=LoginNotification.IsGuest,AccessLog.isNativeMobile=LoginNotification.IsNativeMobile,AccessLog.Timestamp=CURRENT_TIMESTAMP
Can I ask why the rules would make a difference? My question relates to why the system proceeded if it found 1 object? Why did it evaluate the IF statement to true?
I’ve since change the rule to the below and it works.
IF NOT ( EXISTS IPRange WHERE (IPRange.IP=LoginNotification.RemoteAddress)) THEN
CREATE...