Forum Discussion
MikeTamoush
Qrew Commander
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
3 years agoQrew Captain
Exactly
------------------------------
Quick Base Junkie
------------------------------
------------------------------
Quick Base Junkie
------------------------------
- MikeTamoush3 years agoQrew Commander@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
------------------------------ - MikeTamoush3 years agoQrew CommanderActually, scratch that question. I just tested and Pipelines will always update checkbox. It doesn't consider a blank checkbox as null.
------------------------------
Mike Tamoush
------------------------------- QuickBaseJunkie3 years agoQrew Captain@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
------------------------------