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 am creating a custom poll webpart using the following two lists:

1) QuestionList : Stores questions of poll (QuestionId,QuestionDate,Votes,TakenBy)

2) OptionsList: Stores option pertaining to a particular question (OptionId, Question(LookUp), Votes)

I have implemented the functionality. But my concern here is when multiple users try to submit their votes I am not able to achieve concurrency.

I using Sharepoint Web Services to achieve the functionality.

Can some one please throw some light on the issue?

share|improve this question
    
why not using sharepoint surveys ? –  SharePointer Sep 3 '12 at 10:25
    
Because in sharepoint surveys, questions are stored as columns and not rows. I want to dynamically show the questions based on the date on which they are added / the date for which the poll is scheduled –  Joyal4 Sep 3 '12 at 13:54
add comment

1 Answer

You could remove the Vote column and add a UserVotes List with the columns User, Option (Lookup). For each vote you add a entry in the UserVotes List with the user and the Option for which the user voted. To Display the number of votes you can get how many items exists in the UserVotes list with this option.

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.