Forum Discussion

MikeTamoush's avatar
MikeTamoush
Qrew Commander
3 years ago

Blank dates to update fields in Pipeline?

I have a formula date field that is sometimes null and sometimes not. Lets call this [Date].

I have a pipeline that attempts to update a field [Second Date].  The pipeline simply says, update [Second Date] with [Date].

The problem I am having, is if [Date] is null, it does not update. It only updates if [Date] is NOT null, otherwise it skips it. I can't use {{CLEAR}} because I want the two date fields to match, so I don't ALWAYS want it to clear.

Does anyone know if this is a bug or by design, or have a work around?

------------------------------
Mike Tamoush
------------------------------

6 Replies

  • 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).

    {% 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.



    ------------------------------
    Quick Base Junkie
    ------------------------------
    • MikeTamoush's avatar
      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
      ------------------------------
      • QuickBaseJunkie's avatar
        QuickBaseJunkie
        Qrew Captain
        Exactly


        ------------------------------
        Quick Base Junkie
        ------------------------------