Questions about Javscript in "Logic If" function

edmonleung300

Новичок
Регистрация
26.10.2020
Сообщения
10
Благодарностей
1
Баллы
3
Hi, I need help. I want to check if my variable includes "+" or "-" in my Logic If function, but it does not work

const gmtDateTimeZone = Sun May 1 2022 10:38:21 GMT+0800 (AWST);

{-Variable.gmtDataTimeZone-}.includes('+')

or '{-Variable.gmtDataTimeZone-}'.includes('+')

Both do not work

https://i.imgur.com/hAdFPkk.jpg
 

Alexmd

Client
Регистрация
10.12.2018
Сообщения
1 021
Благодарностей
1 383
Баллы
113
try this C#
C#:
try{
    return "found " + new char[]{'+','-'}.Single(x=>project.Variables["gmtDataTimeZone"].Value.Contains(x));
}
catch{
    throw new Exception("not found");
}
 
  • Спасибо
Реакции: edmonleung300

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 768
Благодарностей
1 179
Баллы
113
Hi, I need help. I want to check if my variable includes "+" or "-" in my Logic If function, but it does not work

const gmtDateTimeZone = Sun May 1 2022 10:38:21 GMT+0800 (AWST);

{-Variable.gmtDataTimeZone-}.includes('+')

or '{-Variable.gmtDataTimeZone-}'.includes('+')

Both do not work

https://i.imgur.com/hAdFPkk.jpg
Hi, you can not write javascript in Logical IF action. Logical IF
If You want to write javascript then use javascript action. Custom Code ===> Javascript
 
  • Спасибо
Реакции: edmonleung300

edmonleung300

Новичок
Регистрация
26.10.2020
Сообщения
10
Благодарностей
1
Баллы
3
Thank you, guys.

 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)