Skip to main content
Solved

Status Field Based on Contract Status

  • September 16, 2019
  • 0 replies
  • 41 views

Hi All,

I have a contract start date and contract end date field. It's possible to create if statement for status field like this below

If date is more than 30 days before contract end date, contract status field is active
if date is 30 days before contract end date, contract status field is will expired
if date is equal contract end date, contract status field is expired?

How can I achieve this?, Can you please give me step by step direction for this?

Many thanks

------------------------------
Syaeful Bahri
------------------------------

Best answer by MarkShnierYou

Not tested but try this as a formula text field. Note that Quick Base will walk down the series of tests until it finds the first one that is true, so you need to sequence them correctly.  I suggest that you write the formulas vertically for readability and to help reduce Syntax errors.

IF(
Today() >= [ Contract End Date], "Expired",
Today() + Days (30) >= [ Contract End Date], "Will Expire",
Today() + Days (30) < [ Contract End Date], "Active")

If date is more than 30 days before contract end date, contract status field is active
if date is 30 days before contract end date, contract status field is will expired
if date is equal contract end date, contract status field is expired?

------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
markshnier2@gmail.com
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+22
  • Quickbase Alumni
  • Answer
  • September 16, 2019
Not tested but try this as a formula text field. Note that Quick Base will walk down the series of tests until it finds the first one that is true, so you need to sequence them correctly.  I suggest that you write the formulas vertically for readability and to help reduce Syntax errors.

IF(
Today() >= [ Contract End Date], "Expired",
Today() + Days (30) >= [ Contract End Date], "Will Expire",
Today() + Days (30) < [ Contract End Date], "Active")

If date is more than 30 days before contract end date, contract status field is active
if date is 30 days before contract end date, contract status field is will expired
if date is equal contract end date, contract status field is expired?

------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
markshnier2@gmail.com
------------------------------