1

One date time column: Target date

Requirement: Need to set default 'Target date',5 Days ahead of item creation date.

I have tried this:= but it is not working

=[Target date] = [Created] + 5

Kindly suggest some input for the same :)

0

This is working for me(Given that calculated column is of type DateOnly)

=DATE(YEAR(Created),MONTH(Created),DAY(Created)+5)

Refer this MSDN Documentation for more formulas

  • It is not working for me : – user47524 Feb 7 '18 at 6:07
  • error :The formula contains reference(s) to field(s). – user47524 Feb 7 '18 at 6:08
  • Don't prepend 'Target date' just paste the formula as in.. It should work – little_big_thoughts Feb 7 '18 at 6:30
  • I have date and time column, not calculated column. I am pasting the same in the -->default value section of target date column --> calculated value-->=DATE(YEAR(Created),MONTH(Created),DAY(Created)+5) but still not working – user47524 Feb 7 '18 at 6:51
  • I have tried same DATE(YEAR(Created),MONTH(Created),DAY(Created)+5) with calculated column its working, but in my list I have to set 'Target date' as date and time column. – user47524 Feb 7 '18 at 8:27
0

You cannot refer to the default value with calculated value. Refer the answer in MSDN link. A workaround for this to either use SharePoint designer workflow on Item Added, or you can go for the calculated column.

Hope this helps you.

0

The error “The formula contains reference(s) to field(s).” is by design. The default value cannot refer to other fields. This is because that the item hasn’t been created, the Created column value is none. You can’t set null to the “Target date” column default value.

As a workaround, you can create a calculated column, which is set as DATE(YEAR(Created),MONTH(Created),DAY(Created)+5). Then create a workflow, copy calculated column value to Target date column. Note: you need to set the workflow to be triggered when a new item is created and add pause action in the first step.

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.