Forum Discussion
MarkShnier__You
Qrew Legend
Do you want to come through as an integer number of days? Or could there be fractional days or minutes and hours?
If you have a duration which is really the time span between two date fields then you could make a numeric formula field in native QuickBase called [# of Days]. The formula would be
ToDays([my duration field])
Then use that field in your email.
That large value you are seeing is the number of milliseconds in two days. 60 * 60* 24 * 2 * 1000 = 172800000.
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
If you have a duration which is really the time span between two date fields then you could make a numeric formula field in native QuickBase called [# of Days]. The formula would be
ToDays([my duration field])
Then use that field in your email.
That large value you are seeing is the number of milliseconds in two days. 60 * 60* 24 * 2 * 1000 = 172800000.
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
TateForgey
3 years agoQrew Assistant Captain
Coach, did you give this advice because of any limitations in Pipelines with duration fields? Can I use them in calculations like I would in a formula duration field?
I'm trying to create a Pipeline to track how long a record stays in a certain status and part of that is trying to set up a calculation using duration fields and insert that value into a field in an Update Record step. However, it threw this error:
Validation error: {'time_in_received_status': ["field 'time_in_received_status' could not be coerced", 'must be of integer type']}
I could have other mistakes in what I'm doing, but I just want to make sure I can create duration calculations here or if I need to create fields in the form to do that.
Thanks!
------------------------------
Tate Forgey
------------------------------
I'm trying to create a Pipeline to track how long a record stays in a certain status and part of that is trying to set up a calculation using duration fields and insert that value into a field in an Update Record step. However, it threw this error:
Validation error: {'time_in_received_status': ["field 'time_in_received_status' could not be coerced", 'must be of integer type']}
I could have other mistakes in what I'm doing, but I just want to make sure I can create duration calculations here or if I need to create fields in the form to do that.
Thanks!
------------------------------
Tate Forgey
------------------------------
- MarkShnier__You3 years agoQrew LegendYa, sorry, I don't really know how to work with Durations in Pipelines.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------- TateForgey3 years agoQrew Assistant CaptainWell, it makes me feel a little better that this is on the fringes of even your vast knowledge. Thanks for the response.
------------------------------
Tate Forgey
------------------------------- BRIANHINSHAW3 years agoQrew MemberUsing API records call I have a PO duration field that I pull into a pipeline. Comes from PO End date - PO Start date. The goal is to take the number of months for the PO and break the PO amount into what the monthly invoice forecast would be and create a child record for each month.
{
"to":"insert appID",
"data": [
{% for num in range (quickbase_on_new_event_1.po_duration | int) %}
{
"6": {
"value": "{{quickbase_on_new_event_1.po_start_date + time.delta(months= (num+1)) }}"
{# FID 6 month #}
},
"7": {
"value": "{{quickbase_on_new_event_1.po_monthly}}"
{# po monthly to FID 7 amount #}
},
"8": {
"value": "{{quickbase_on_new_event_1.po_number}}"
{# related po FID 8 #}
}
}
{% if loop.last == false %},{% endif %}
{%- endfor %}
]
}
------------------------------
BRIAN HINSHAW
------------------------------