Why this if doesn't work as expected?

  • Автор темы Автор темы avalongits
  • Дата начала Дата начала

avalongits

Новичок
Регистрация
14.02.2013
Сообщения
38
Реакции
0
Баллы
0
Please, don't blame me! I'm sure I'm missing something. I've created this simple template:

ifstrange.jpg


But the if (as you can see in the log) return nothing (it equals to false)

I've tried also:
{-Variable.testvar-}=="anything"
{-Variable.testvar-}==anything
{-Variable.testvar-}="anything"
{-Variable.testvar-}=anything
 
If variable is not numerical and contains text you should use this format:

Код:
Развернуть Свернуть Копировать
'{-Variable.testvar-}'==''
variable is empty = true
Код:
Развернуть Свернуть Копировать
'{-Variable.testvar-}'!=''
variable is not empty = true
 
  • Спасибо
Реакции: avalongits
Thanks!

But if {-Variable.testvar-} contains a ' character, the if doesn't work.

How to solve it?
 
use Word processing->Prepare JavaScript for {-Variable.testvar-} before
 
  • Спасибо
Реакции: avalongits
I had the same problem buddy, if it returns nothing and eventually false, the variable has a hidden space/enter/tab in the end/beggining
do this on the variable:
Text Processing -> "Trim" ->(Space,Enter,Tab) beginning and end.

Hope it helps! :)
 

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