views:

1011

answers:

1

Suppose we have a list of items with applicable owners

Item  Owner
A1     O1
A2     O1
A3     O2
A4     O4
A1     O2

i.e. a many-to many mapping

For each item owned by him, the owner will answer a fixed set of questions.Therefore, in the survey O1 will answer questions for A1 and A2, O2 for A3 and A1 ...

  • Owner with no questions will not be allowed to answer any questions.

How can we design such a survey using Sharepoint 2007

+1  A: 

You will need to create a Custom rendering template for getting this working.

Below is the brief steps to get it working :

Create

  1. Create a Class based on the SurveyFieldIterator, override the method IsFieldExcluded this method dictates if the field has to be displayed in the UI or not. Inside this method you place your business logic of reading from the List if the user has access to the question or not and based on that return true or false.
  2. Next is to create a Custom Rendering template based on the above class.
  3. Next Create your custom Survey Template,Create a Copy of C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\TEMPLATE\FEATURES\SurveysList folder to MySurvey. In the schema.xml you need to change the template Template="SurveyForm" of < Forms> tag present at the end of the file.
  4. Deploy both the Template,Rendering template and custom class.
  5. Create a survey based on the above template and stuff it with all possible question you want.
Kusek