Forum Discussion
MikeTamoush
4 years agoQrew Elite
Thanks! Can I simply put that entire thing in the condition? Meaning, where I would normally say, set [Seond Date] to {{a.date}}, I replace {{a.date}} with the entire if jinja?
------------------------------
Mike Tamoush
------------------------------
------------------------------
Mike Tamoush
------------------------------
QuickBaseJunkie
Qrew Legend
4 years agoExactly
------------------------------
Quick Base Junkie
------------------------------
------------------------------
Quick Base Junkie
------------------------------
- MikeTamoush4 years agoQrew Elite@Quick Base Junkie
Is it the same for a checkbox? Or is there different jinga like {{FALSE if a.checkbox is false else TRUE}}
------------------------------
Mike Tamoush
------------------------------ - MikeTamoush4 years agoQrew EliteActually, scratch that question. I just tested and Pipelines will always update checkbox. It doesn't consider a blank checkbox as null.
------------------------------
Mike Tamoush
------------------------------- QuickBaseJunkie4 years ago
Qrew Legend
@Mike Tamoush you are correct, as a boolean field, the checkbox will always be either true or false.
As such its inherent value is always true or false, so if for example, you wanted to flip it from true to false (or false to true) the Jinja would be:
{{ false if a.checkbox else true }}
Basically, "false if true else true" because the if condition is always looking for a 'true' value.
Similar to how you may write the same in a QB formula If([Checkbox],false,true).
UPDATE: I just reviewed my own cheat sheet from Intro to Jinja for Pipelines and this can be accomplished even quicker with {{ not a.checkbox }}
-Sharon
------------------------------
Quick Base Junkie
------------------------------