I have a list with multiple columns.

This list may include multiple records. I want the value of a specific field to be changed when a special record is read for the first time.

  • Disclaimer: I never tested this solution so use it at your own risk. This codeplex project seems to do what you are asking. Perhaps you could start there and implement a custom solution if no other answer is provided.
    – SPArcheon
    Commented Dec 28, 2011 at 14:32
  • If its a dynamic value, you can use a calculated column to pull data from other columns. Whats your exact intention? Can you ellaborate the question?
    – Deepu Nair
    Commented Dec 29, 2011 at 7:24
  • Whilst this is subtly different to the question you asked yesterday, it is leading to the same solution. I am therefore merging the two questions.
    – SPDoctor
    Commented Dec 29, 2011 at 9:21
  • @ Deepu Nair How to give a record is read?
    – ar.gorgin
    Commented Dec 29, 2011 at 10:00

3 Answers 3


You could edit the DispForm of the list item and in it have a delegatecontrol (or some other custom control) to count how many times the page has been loaded by unique user id's other than the authors id.


Create a new user/web/delegate control and insert the following code:

var web = SPContext.Current.Site.OpenWeb();
var list = web.Lists["Name of the list"];
var itemId = Page.Request.QueryString["ID"];
var item = list.Items.Cast<SPListItem>().FirstOrDefault(i => i.ID.Equals(itemId));
var isRead = (bool)item["Internal name of the column"];
    item["Internal name of the column"] = true;

This should pretty much do the job of updating the items column stating if it's read or not.

  • I have a column with false value . How do i change value when DispForm is display?
    – ar.gorgin
    Commented Dec 29, 2011 at 5:11
  • @niloo Please read my update.
    – user2536
    Commented Dec 29, 2011 at 8:37
  • thanks a lot . but how i can created a new user/web/delegate control?
    – ar.gorgin
    Commented Dec 29, 2011 at 9:11
  • @niloo You do this in Visual Studio. I take it you're not a developer, so I suggest you get a hold of one who can develop the control and insert it correctly for you.
    – user2536
    Commented Dec 29, 2011 at 9:22
  • how can i edit a DispForm.aspx in visual studio?
    – ar.gorgin
    Commented Dec 29, 2011 at 9:38

You can set the default value for the field in list....

  • i have a field with false value , i want set true when dispform is load.
    – ar.gorgin
    Commented Dec 29, 2011 at 7:25
  • Make it true by default...????
    – Strider
    Commented Dec 29, 2011 at 7:27
  • yes , i want set default value
    – ar.gorgin
    Commented Dec 29, 2011 at 7:29
  • Go to list settings>>> select your column>> click it>> u find default value...>> select ur value and click Ok... :)
    – Strider
    Commented Dec 29, 2011 at 7:37
  • thanks , but i want set default value when dispform is load .i don't set value when item is created
    – ar.gorgin
    Commented Dec 29, 2011 at 7:38

There are several solutions:

  1. You can open this form in SharePoint designer, add to this form Edit Content WebPart. To this web part you can add java script that finds your drop down box and set your value.
  2. You can create your own field in VS2010. In this field you can set your value.
  3. You can create your own template in VS2010 for this form. In this template you can use JS, remove ListFieldIterator and set your own markup, or use your own iterator.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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