The above is simply to assign a value based on the below logic.
if usertype is not null and usertype_override is not 1 then 1 else 0
It always returns 0 even if the criteria is met.
You could use the .length() formatter to check whether a value exists. It would also account for an empty string whereas null has to be null (not empty)
I’ve been checking the values in the browsers inspector and they are as expected, I also just tried what you suggested and it printed the value for user_type, the user_type_override is stored as null
(chklist_personal_data.data.query.user_type_override != 1) ? 1 : 0
works as expected while
(chklist_personal_data.data.query.user_type) ? 1 : 0
this does not - checking that the value exists always fails. have confirmed that the field names are correct and that the value in this case ‘applicant’ is in the db.
(chklist_personal_data.data.query.user_type == null) ? 1 : 0
The above just came back as true, which doesn’t make sense.
The image shows the source of the values from the browser, yet the above statement is coming back as true. I hope this is something really silly I’m looking past.
Since the length formatter is working I think it is actually an empty string and not a null value. The length formatter is only for strings, you get an error in the console when it used on a null value.