checkbox formula in child's table to pull records into the parent's table.

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

What I want I am trying to do is create another checkbox formula on the adult table that is based on if the checkbox formula on child's table is checked plus age > 20 (age is a numeric formula in the parent's table)

Child's table checkbox formula:

Date field (needs to be null)

text 1 field (must contain the words "ABC")

text 2 field (must = "Word")

If(
IsNull([Date],
Contains([Text 1],"MCP"),
[Text 2]="Kidney",
true, false))

I am getting an error about the IsNull (x).

Also, would this be better if I change it to a numeric formula and then in the summary field of the parent table I can have it pull if the field = 1?

Thank you in advance!

Sandy

Photo of Sandralee

Sandralee

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,542 Points 50k badge 2x thumb
Try this for the formula on the child table

If(
IsNull([Date]
and Contains([Text 1],"MCP")
and [Text 2]="Kidney",  true, false))

You can then do  summary field to count the number if qualifying child records.  Perhaps called

MCP Kidney

Then in the Parent the formula could be a formula checkbox field of

IF([AGE] > 20 and [MCP Kidney]=true, true)
Photo of Sandralee

Sandralee

  • 0 Points
Thanks, Mark!  I tried that and I am getting a formula error--Type Mismatch
The expression [Date] on the left hand side of the operator "and" is of type date while the expression Contains([Text 1],"MCP") on the right hand side is of type bool. The operator "and" cannot be used with these types of expressions.
Photo of Sandralee

Sandralee

  • 0 Points
What I did was add an additional checkbox formula field that if date is blank return true.  Then used that field in place of the date field and now I get the expected results.  Thank you for helping me!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,542 Points 50k badge 2x thumb
OK, I was missing a closing bracket. That is why you had a problem.

If(
IsNull([Date])
and Contains([Text 1],"MCP")
and [Text 2]="Kidney",  true, false))