0

I would like users to be unable to change formulas of some calculated columns, both from the list settings and from datasheet view. I am currently trying this via event receiver but I have went back to the drawing board after a couple failed attempts. I am certainly not opposed to doing this in some way other than an event receiver.

1

If you create the column in Visual Studio, you can make it to a calculated field and then seal the column.

EDIT:

Here's one i have in my sollution.

<Field ID="{CAB6736A-8254-43E4-B4EA-905B487CA9AD}" Group="TF Intranet" Type="Calculated" Name="TFHyperlink" ResultType="Number" DisplayName="Vís" Sealed="TRUE">
    <Formula>="&lt;a href='/_Layouts/tf.intranet/TFEventPage.aspx?EventId="&amp;ID&amp;"'&gt;Vís&lt;/a&gt;"</Formula>
</Field>
  • This works. It prevents the formula from being changed in Datasheet view. It appears that the user can change the formula but once the page is refreshed, the formula is restored to the original value. I would like to point out that this prevents a user from changing the calculation in list settings as well. – James Grizzle Oct 15 '12 at 15:22

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.