cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1329
Views
0
Helpful
4
Replies

ICM Formula error

John.McCartney1
Level 1
Level 1

I have an error that keeps coming up when creating a formula in an IF element. I keep getting the error: "Unexpected token: less than" Do you want o ignore this error for now?

 

Here is my formula I'm trying to use which will test to see if the day is Friday (6) and the time for east timezone is > 5pm or 17.0. I want the function to run(calls go to service desk) from that time until Sunday at 7am west timezone  

 

(weekday(<userZones_Eastern_DateTime>)=6&&
time (<userZones_Eastern_DateTime>)>time(17,0))||
(weekday(<userEastern_DateTime>)=7)||
((weekday(<userWestern_LocalTime>)=1&&
time(<userWestern_LocalTime>)<time(7,0))

 

What is causing the the error syntactically?

 

Thanks.

1 Accepted Solution

Accepted Solutions

I'm going to take a guess and say that those User Variables are having their values set in some Admin script. They're likely setup as Global object types, so you'll have to call them as such. Something like this...

 

(weekday(Global.userZones_Eastern_DateTime)=6&&
time(Global.userZones_Eastern_DateTime)>time(17,0))||
(weekday(Global.userEastern_DateTime)=7)||
((weekday(Global.userWestern_LocalTime)=1&&
time(Global.userWestern_LocalTime)<time(7,0))

View solution in original post

4 Replies 4

Omar Deen
Spotlight
Spotlight

Is that the exact formula you're using? It won't like the less than and greater than symbols being used inside those parenthesis. If you put those in for aesthetics, then could you let us know if that's an ECC variable or a User Variable? If they're User Variables, what Data Type are they set to?

Those User Variables are type=Float.

 

When I removed the "<" & ">" from the script I get this error now
Undefined symbol: userZones_Eastern_DateTime

Do you want to ignore this error for now?

 

I've looked at the way the current scripts are designed and they use the "<" & ">" in a lot of them. I'm fairly new to this company and I'm still learning how they have things setup. Thanks for your help.

I'm going to take a guess and say that those User Variables are having their values set in some Admin script. They're likely setup as Global object types, so you'll have to call them as such. Something like this...

 

(weekday(Global.userZones_Eastern_DateTime)=6&&
time(Global.userZones_Eastern_DateTime)>time(17,0))||
(weekday(Global.userEastern_DateTime)=7)||
((weekday(Global.userWestern_LocalTime)=1&&
time(Global.userWestern_LocalTime)<time(7,0))

Thank you Omar! Yes they need to be declared as Global because the value was calculated in another admin script, and I had to have the "paren's" in the right places too.