Skip to main content
Question

Formula assistance

  • July 27, 2022
  • 0 replies
  • 44 views

Forum|alt.badge.img+11
This works...
If(ToText([Job - Related Sub Payroll22 - 2nd COAT (DAY 1) DATE])<ToText(Today()),
"<img src=\"https://images.quickbase.com/si/24/221-point_red.png\" title=\"DONE\">",
"<img src=\"https://images.quickbase.com/si/24/222-point_green.png\" title=\"TO DO\">")

AND, I need to add:
If(ToText([Job - Related Sub Payroll22 - 2nd COAT (DAY 1) DATE]) is blank,
"<img src=\"https://images.quickbase.com/si/24/223-point_yellow.png\" title=\"ALERT\">"

------------------------------
BuildPro
------------------------------

Forum|alt.badge.img+20
  • Registered
  • July 27, 2022
In general, to test if a text field is blank, you can just say [Text Field] ="", and to test if a date field is blank, you can do: is null([Date Field]).

In your example, you would use the first way, but I am not sure why you are converting your dates to text? The following should work:

var text PayrollField = [Job - Related Sub Payroll22 - 2nd COAT (DAY 1) DATE];

If(
  $PayrollField < Today(), "<img src=\"https://images.quickbase.com/si/24/221-point_red.png\" title=\"DONE\">",
 isnull($PayrollField), "<img src=\"https://images.quickbase.com/si/24/223-point_yellow.png\" title=\"ALERT\">",
"<img src=\"https://images.quickbase.com/si/24/222-point_green.png\" title=\"TO DO\">"
 )

------------------------------
Mike Tamoush
------------------------------