Jump to content

If text field contains text then insert date to another fields


This topic is 732 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hi,

Im trying to get a calculation for a field  so when  "Status" is changed to say.. "Canceled" then the "Canceled date" field auto fills in the current timestamp.

 

 

Link to comment
Share on other sites

I wouldn’t rely on an auto enter. I’d write a script that handles the status change and if the change is to “Cancel”, then I’d also set date cancelled. 

Link to comment
Share on other sites

  • Newbies

thanks for the input, 

So what im trying to do is. 

I have a status field with  Quote, work order, canceled, finished.

I have 4 text fields too, i wanted so when i select either one, the corresponding text field is filled in the timestamp so i can then see later when it was changed from quote to work order or when it was canceled. 

:)

Link to comment
Share on other sites

Try something like:

If ( Status = "Canceled" ; Get ( CurrentTimestamp ) ; Self )

The field can be a text field, but properly should be a timestamp field. The calculation would be auto-entered, with replacing existing value.

Note that this will update every time the status is changed to "Canceled". If you accidentally change it to "Finished" then back to "Canceled", the original cancel timestamp will be lost.

A better arrangement might be to perform the canceling by entering a value directly into the Canceled timestamp field. Then calculate the status based on which timestamp fields are filled.

 

 

Edited by comment
Link to comment
Share on other sites

I recommend a related status history table. Each time the status changes, use a script to create a record in this table. It has createdTimestamp, created By fields which will allow you to see and report on statusHistory.

Link to comment
Share on other sites

This topic is 732 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.