Forum Discussion

SyaefulBahri3's avatar
SyaefulBahri3
Qrew Trainee
6 years ago

Status Field Based on Contract Status

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
------------------------------
  • 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
    ------------------------------
  • 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
    ------------------------------
    • SyaefulBahri3's avatar
      SyaefulBahri3
      Qrew Trainee
      Hi Mark,

      Thank you for your help. I think this is working.

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