Formula based on the number of records in a report link?

  • 0
  • 1
  • Question
  • Updated 2 months ago
  • In Progress
So I have a report link on a record that references back to the same table. Is there a way to build a formula based on the number of records on this report? Since it's not a relationship I can't add a summary field. I would just like to check a checkbox if there is more than one record on that report. 

My goal here is to create a warning that the part number being used has been used on this table before. I don't want to stop the duplicate from being created, but just create some sort of warning that there are other records with that same part number. 
Photo of Andreonna

Andreonna

  • 1,040 Points 1k badge 2x thumb

Posted 3 months ago

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

QuickBaseCoach App Dev./Training, Champion

  • 51,346 Points 50k badge 2x thumb
I suggest that you in fact make a relationship of the table to itself.

Make a formula field called [Part # mirror] with a formula of [Part #]

Use that field in the right side of the relationship. Then make a summary field. It will show up weird looking in the relationship, but it will work.
Photo of Andreonna

Andreonna

  • 1,040 Points 1k badge 2x thumb
Does the formula field have to be numeric for this to work? Because out part number fields are text due to being alphanumeric. 
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,346 Points 50k badge 2x thumb
They do not need to be numeric, but the key field of the table would need to be set to be the Part # field.

If the key field the table is currently Record ID number and you have a never change the key field before, then I suggest making a copy of your app and practicing on a copy first.
Photo of Slider

Slider

  • 1,326 Points 1k badge 2x thumb
How is the part being selected? I would like to think there is a relationship in place to allow you to prevent the selection via a report applied as a form element, or to summarize and look up as an indicator for your record. Need more information. :)