unstuck
unstuck

Reputation: 650

Add a column to a SharePoint list with a constant value

A SharePoint list needs a new column "ColumnA".

I want this column to have a constant value = "Constant".

How do I do this?

What I have tried?

Add a column with a calculated value like:

="Constant"

And multiple variations of this expression, but it doesn't matter because the new column is created empty.

Thanks for helping!

Upvotes: 0

Views: 894

Answers (2)

Gil
Gil

Reputation: 11

Try placing your value in Calculated Column instead of calculated value.

This way the value is read only and you can show the column with no risk of it being changed in quick edit.

  1. Go to: Add Column -> More
  2. Set the type to Calculated (calculation based on other column)
  3. Enter the constant value inside the Formula section.

For string value use parentheses..

Choose Calculated as information type

Upvotes: 0

anfalt
anfalt

Reputation: 48

You could set the column to hidden (content type settings in list settings) and provide a default value for the column. This will not prevent users from changing the value via quick edit, you could disable quick edit via the list settings to avoid this.

Upvotes: 0

Related Questions