3

I have created an action list and when the status column is set to 'closed', I would like the 'date closed' column to automatically populate with the current date. If this is not possible, it would be nice to make the 'date closed' column become a mandatory field.

Is this possible? And if so what would the formula be?

  • You could try this surpoint.blogspot.com.ar/2012/07/… – Juan Pablo Pussacq Laborde Apr 8 '16 at 13:18
  • Thank you but I'm unable to change the code, so I need a calculate value formula or a column validation formula I think. – NCP Apr 8 '16 at 13:44
  • could I use date modified? for example if status = closed then the date closed column = last modified date? – NCP Apr 8 '16 at 14:02
  • Yes, modified is suported. – Juan Pablo Pussacq Laborde Apr 8 '16 at 14:06
  • what would my formula be? is this correct? =IF[Status]="Complete", [Date Closed]=[Date Modified] and do I put this in a calculated value column or a date/time column? – NCP Apr 8 '16 at 14:14
2

What you need is a formula at list item validation. Go to list settings, and find validation settings.

The formula you need to use should be something like the below one:

=IF([Status]="Closed",IF([Date Closed]=Today(),TRUE,FALSE),TRUE)

Instead of checking the [Date Closed] to be today only, you might want to just check [Date Closed]>=Today(). Or, if Today() doesn't work, you might want to compare for empty value by [Date Closed]<>"".

Note: List validations allow a field to be required depending on the value of onother field. Whith no code!

  • I think you are confusing list validation with calculated columns. And although I have never used this myself, I have seen some articles actually using this. For instance: premierpointsolutions.com/training/help-and-how-to-articles/… . Do you have any references to MSDN that says Today() should not be used in list validations? Or, can you suggest any workarounds? – Nisarg Apr 8 '16 at 13:56
  • You can make the edit yourself. Maybe you can add a thing or two I don't know about list validations! :) – Nisarg Apr 8 '16 at 14:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.