Becca37 Posted March 27, 2019 Report Share Posted March 27, 2019 Hello, I've taken the age calculation from https://howto.caspio.com/datapages/reports/advanced-reporting/calculations-in-forms-and-reports/ and am trying to put it into the formula for a field in a table. Datediff(year,[@field:DOB],GetUTCDate()) My field name used in the calculation is DOB just like in the example. The field is a date/time data type. What might I be doing wrong? Thanks! Quote Link to comment Share on other sites More sharing options...
0 MayMusic Posted March 28, 2019 Report Share Posted March 28, 2019 Nondeterministic functions cannot be used on formula fields in the table but you can use them in calculated value and calculated fields on your DataPages. In the table, the formula is not valid when it contains SQL subqueries, aggregate functions (SUM, AVERAGE), nondeterministic functions (GetUTCDate, Rand), or other formula fields. Quote Link to comment Share on other sites More sharing options...
0 Becca37 Posted March 28, 2019 Author Report Share Posted March 28, 2019 11 minutes ago, MayMusic said: Nondeterministic functions cannot be used on formula fields in the table but you can use them in calculated value and calculated fields on your DataPages. In the table, the formula is not valid when it contains SQL subqueries, aggregate functions (SUM, AVERAGE), nondeterministic functions (GetUTCDate, Rand), or other formula fields. Ahhh, thanks! I didn't even pay attention to that page I quoted being for reports and not tables. Off I go to add Age to a report instead. Thanks! Quote Link to comment Share on other sites More sharing options...
0 MayMusic Posted March 29, 2019 Report Share Posted March 29, 2019 You are welcome. Also keep in mind the calculation in a table can be done only on the data of the same row only. Quote Link to comment Share on other sites More sharing options...
Question
Becca37
Hello,
I've taken the age calculation from https://howto.caspio.com/datapages/reports/advanced-reporting/calculations-in-forms-and-reports/ and am trying to put it into the formula for a field in a table.
My field name used in the calculation is DOB just like in the example. The field is a date/time data type.
What might I be doing wrong?
Thanks!
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.