is there anyway to make a condition true by using not equal to (!=) ?
!= is not a valid operator in OutSystems, but you can use <> instead of !=
Fábio Fantato wrote:
what does <> do? I can't find any docs on it.
Michael Henderson wrote:
It means "different" just like !=. It depends on the language and in OS it is <> that we use.
You can also use the prefix "not" or, because this is an if, just switch the branches.
Hi Michael,
Like Fábio already said, the "not equal" operator is "<>" in OutSystems (that is, a "<" followed by a ">"). This may seem strange for someone only knowing curly braces languages like C, C++, C#, Java or JavaScript, but it has a long history, and languages like Pascal and SQL also use "<>". Note that OutSystems uses other operators also taken from Pascal/SQL, like "and" and "or" instead of "&&" and "||", "not" instead of "!" etc.
As for Nuno's reply, never ever use If(condition, True, False). It's ugly and superfluous. Just use condition by itself (as in Nuno's last example).