Calculated Field Formula as the Default Value of a Text Column

There must be a time when you needed to use another Column’s value as the Default value for a non calculated field type columns.  I am sure you tried to do the following:

  • Use the “Default Value” field in the column properties
  • Insert a calculated formula like in the image below.calculated field formula as default value

And when you try to save it like this, you get an error and this is why you are in this page trying to know that is going wrong.

In my case, I was trying to set a default value of a text field using the Title field when I saw this error. The formula contains reference(s) to field(s).

Is there a Solution?

After searching the documentations provided by Microsoft about the Calculated Fields and the formulas, I found this useful information which is not useful for our case:

  • You cannot reference;
    • a value in a row other than the current row.
    • a value in another list or library.
    • the ID of a row for a newly inserted row. The ID does not yet exist when the calculation is performed.
    • another column in a formula that creates a default value for a column.

If you desperately need to achieve this goal, you will need to create custom forms for Sharepoint on Premise versions either with 3rd party form builders or with .Net development.

But if you are using Sharepoint Online, there is a good option for using a customized form in the Modern View with Power Apps.

You will basically customize the form with PowerApps and set the default value of the column like shown in the picture. The column ‘MailTitle’ has the default value of the column ‘Title’.

As long as you don”t insert any custom text to the field, it will automatically set the referenced field’s value. If you change the text, then it will be whatever you want.

Happy days!

Leave a Reply

Your email address will not be published. Required fields are marked *