Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
    
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. –  SPArchaeologist Dec 28 '11 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 Dec 29 '11 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 Dec 29 '11 at 9:21
    
@ Deepu Nair How to give a record is read? –  ar.gorgin Dec 29 '11 at 10:00
add comment

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.

Update

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"];
if(!isRead)
{
    item["Internal name of the column"] = true;
    item.Update();
}

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

share|improve this answer
    
I have a column with false value . How do i change value when DispForm is display? –  ar.gorgin Dec 29 '11 at 5:11
    
@niloo Please read my update. –  Daniel Ziga Dec 29 '11 at 8:37
    
thanks a lot . but how i can created a new user/web/delegate control? –  ar.gorgin Dec 29 '11 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. –  Daniel Ziga Dec 29 '11 at 9:22
    
how can i edit a DispForm.aspx in visual studio? –  ar.gorgin Dec 29 '11 at 9:38
show 2 more comments

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

share|improve this answer
    
i have a field with false value , i want set true when dispform is load. –  ar.gorgin Dec 29 '11 at 7:25
    
Make it true by default...???? –  Strider Dec 29 '11 at 7:27
    
yes , i want set default value –  ar.gorgin Dec 29 '11 at 7:29
    
Go to list settings>>> select your column>> click it>> u find default value...>> select ur value and click Ok... :) –  Strider Dec 29 '11 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 Dec 29 '11 at 7:38
show 9 more comments

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.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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