Forum Discussion
- Are we implying there are 12 fields for each month Jan /Feb / March and whenever a family member has a birthday , that particular field will get updated each month ?
- All items are stored as text ? Can you give example of one field to gauge ?
- I keep thinking why won't a QuickBase formula achieve this?
I did a simple test with
(text)Name - Prashant
(date)DOB - 29/05/1985
(text)Month
pipeline Jinja
{{(a.dob|timezone('Asia/Calcutta')).strftime('%b')}}
The advantage of above method is simply referencing the date field and month will be found. Once we are clear with the structure , we could play around
------------------------------
Prashant Maheshwari
------------------------------
- AmyGosz12 years agoQrew Trainee
Yes, there is one field for each month. These fields are used as prompts for what type of contact may be needed. We do not capture full dates for the birthday and in many cases only know the month. If there is already text in the month field, then we don't want to overwrite that, only add on additional note about it being a birthday month. If there is no text, then we will just populate it noting that it is a birthday month.
12 Month fields - text, multiple lines
3 charac Month field - text
Family Member 1 and 2 fields - text
I am trying to figure out how the pipeline can check for values in the month field and if no value, populate with 'Birthday Month'. If there is a value, then keep current value and add 'Birthday Month'.
------------------------------
Amy Gosz
------------------------------- DougHenning12 years agoCommunity Manager
Don's original reply is correct, you need to use == for the comparison and put quotes around the value to compare. This will add to the may_touch field if a value exists, or set it to "Birthday Month" if empty.
{%- if (a.account_number_family_1_birth_month_3_charac == "May" or a.account_number_family_2_birth_month_3_charac == "May") and not a.may_touch %} Birthday Month {% else %} {{ a.may_touch }} Birthday Month {%- endif %}
------------------------------
Doug Henning
------------------------------- AmyGosz12 years agoQrew Trainee
Hi Doug...this did not work. For some reason it got added to every record, not just the ones with a May birthday. Also, the code didn't like the quotes around May so I removed those. I did try a couple other options, but it still isn't populating only when May is the birth month. The other thing for this is that if the 'month field' already has 'birthday' in it, then I don't want it to add it again. This will be a scheduled pipeline to run daily.
------------------------------
Amy Gosz
------------------------------