function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MacLeanMacLean 

Formula based on date...that indicates status

Im looking for a formula that is based on date.  So basically, a customer calls and in the contact record I want a field that indicats if the customer is "in service" or "out of service".  When a customer buys our product they get 1 year of free service.  So,  365 days later they are "out of service".   I want a field in the contact record to be based on this date.  In theory this date would be pulled from the latest "transaction date" in the "retail transactions" section.  Is this even possible?

Thanks, Mac
CurtAllen.ax323CurtAllen.ax323
Code:
IF(FieldName__c -TODAY()<=0,"Out of Service","In Service")

 
:smileyvery-happy:
MacLeanMacLean
wow, this is very close to what Im looking for.

So I created a field called "service start".  So it derives the date from that field. See below...

IF(Service_Start__c -TODAY()<=0,"Out of Service","In Service")

The problem now is that I want to be out of service 365 days after that date.  In its current incarnation its "out of service" if its less than todays date. 

How would I edit the formula above to reflect that?

Thanks, Mac
CurtAllen.ax323CurtAllen.ax323
Happy Monday, hope your weekend was well.
 
Well, the way I have the formula working is, yes, anything today or less is going to be displaying as out of service.  My thought on what you asked was company A signs up for a 1 year contract.  One year from today this contract would expire, so once today next year approaches the contract would display as "out of service."
 
Now that you mention it, I see that my thinking was flawed.  The main obstacle I ran into with the formula is they run dynamically.  This means they update real time, and therefore cannot display past information.   This means that you can either display it for future, or past contracts... running forward to the year, or running back (with some work.)
 
If I am completely misunderstanding, please do let me know and I will do my best to help you. :smileyvery-happy: