Forum Discussion
QuickBaseJunkie
Qrew Captain
I feel this!
In my opinion, this is a 'FAIL' in the way Pipeliens currently functions.
Here is the solution (and the same one support will suggest).
------------------------------
Quick Base Junkie
------------------------------
In my opinion, this is a 'FAIL' in the way Pipeliens currently functions.
Here is the solution (and the same one support will suggest).
{% if a.date is none %}
{{ CLEAR }}
{% else %}
{{a.date}}
{% endif %}
Could also be written in the condensed format as:
{{ CLEAR if a.date is none else a.date }}
If you're interested in learning more about Jinja check out this Intro to Jinja for Pipelines course.
Could also be written in the condensed format as:
{{ CLEAR if a.date is none else a.date }}
If you're interested in learning more about Jinja check out this Intro to Jinja for Pipelines course.
------------------------------
Quick Base Junkie
------------------------------
MikeTamoush
3 years agoQrew 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
------------------------------
- QuickBaseJunkie3 years agoQrew CaptainExactly
------------------------------
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
------------------------------