This article provides information on troubleshooting Quickbase formulas.
Resolving incorrect type errors in formulas
Incorrect type errors occur when a formula function or operator expects a different data type than the one used in the formula or the one expected in the result.
What is a data type?
In software, a data type is the type of value a variable has and what type of mathematical, relational, or logical operations can be applied to it without error. Most programming languages use the data type string for text, integer for whole numbers, and floating point for numbers with decimal points.
Resolving incorrect type errors
To resolve incorrect type errors, use a type conversion function to convert one or more data types in your formula.
Date and work date errors
Error | Solution |
Work dates and dates don't match |
Use the ToDate() function to convert a work date to a date |
Solutions
Goal | Error details | Type conversion solution |
Find the duration between two dates |
Field type: Formula in error: Why it doesn't work: |
Solution: Revised formula: |
Find the duration between two date/time values |
Field type: Formula in error: Why it doesn't work: |
Solution: Revised formula: |
Generate a date that's two weekdays after the event in a date / Time field |
Field type: Formula in error: Why it doesn't work: |
Solution: Revised formula: |
Numbers, dates, and duration errors
Error | Solution |
Numbers don't mix with dates and durations |
Convert the number to a duration using a function like Days() |
Solutions
Goal | Error details | Type conversion solution |
Calculate how many gallons are used per hour
|
Field type: Formula in error: Why it doesn't work: |
Solution: Revised formula: |
Calculate the difference between the days estimated to complete a job versus the actual days it took |
Field type: Formula in error: Why it doesn't work: |
Solution: Revised formula: |
Find the number of months between two dates |
Field type: Formula in error: Why it doesn't work: |
Solution: Revised formula: |
Calculate depreciation based on time passed |
Field type: Formula in error: Why it doesn't work: |
Solution: Revised formula: |
Calculate a task's finish date, based on the start date and number entered in the [Estimated # of Days] field. |
Field type: Formula in error: Why it doesn't work: |
Solution: Revised formula: |
Literal errors
Error |
Solution |
Literals often need to be converted to a data type (What's a literal?) |
Use a conversion function to change the result to a different data type. |
Solutions
Goal | Error details | Type conversion solution |
Use Ebenezer red to color projects assigned to a user |
Field type: Formula - Checkbox (in Report Builder) Formula in error: Why it doesn't work: |
Solution: Revised formulas: Send by email: |
Mark records where start time is after 6 am |
Field type: Formula in error: Why it doesn't work: |
Solution: Revised formula: |
Boolean errors
Error Boolean (true or false - checkbox) values don't mix with numbers |
Solution Use the ToNumber() function to change the result to a different data type. |
Solutions
Goal | Formula in error | Type conversion solution |
Calculate the number of checkboxes turned on |
Field type: Formula in error: Why it doesn't work: |
Solution: Revised formula: |
Blank result errors
Error |
Solution |
Formula draws a blank |
If a formula saves but appears blank in the report, another field called by the formula might be the issue. Check these things:
|
Null function errors
Error | Solution | |
A formula that includes a null function doesn't work | Go to the field's properties, select the table and field, and clear Treat blank values as "0" in calculations |