Quantcast
Channel: Mockaroo Community Forum - Latest posts
Viewing all articles
Browse latest Browse all 2665

What is the correct way to use logical operators in a formula?

$
0
0

For the life of me, I can't figure out what's the mistake I am making.

Here's the schema (link). The mischievous field is play1isCorrect_ (the last one).

It has a simple logical condition as a formula, based upon the two aforementioned fields.

if (field("play1_q") == 1 and field("play1_a") == 2) then true else false end

However, the sample data generated, assigns False to this field, for all the rows. Its behaviour is as if the condition is completely skipped:

The condition ( play1_q is 1 and play1_a is 2) is obviously evaluated wrongly.
Where am I going wrong?


Viewing all articles
Browse latest Browse all 2665

Latest Images

Trending Articles



Latest Images