HI All, My requirement is admin will create a set of questions , which has main category and sub category , the sub category will be any number , and number of question in each sub category also will be any number each question has filed type he will select the type of field, after creating lot of questions like this. admin will craete survey document there he will select the user mail id and select number of questions,
once he submit the document the survey document should be categorised based on the questions. the document will have main category sub category and all the questions in each sub category, is it possible to do this in web?
here the challenge is the number of sub category and number of question in each sub category is unlimited ,when admin send survey the docuemnt should have main category sub category and questions, once user submit the survey we have to capture there feed back
pls let me know if you need any clarifications , pls suggest me
Is this to be a NOTES client or WEB client application? There is an older application in the Sandbox called Tablewalker that will do what you want for both clients. This can be fairly easily modified to have a more modern interface. Essentially, you want to create a hidden multivalue field for each column of data in your “table” and use a semi-colon to separate the values. This is the storage for your table. Use a second set of computed for display fields to display the data. These fields should be placed either in a table, or preferably, within divs kind of like this:
data
data
data
data
data
data
data
data
The editme() function should place the values from each column in the selected row in editable fields whenever you click anywhere on the row (other methods such as a column with an icon could also be used for editing) and also set a variable called selectedrow. This variable will be used when you write the new values back into the fields. Note that you will need to keep your html AND the values of the computed fields in synch (for display and storage). Populating the div when you open an existing document on the web can be done in via a function call in the onLoad event. The needed functions would be for:
append a new row
edit an existing row
delete an existing row (all rows under it should have their div ids updated to reflect their new row number)
insert a new row (again all rows under it should have their div ids updated to reflect the new row numbers)
I like this method because, while it is more work than the tablewalker script, you can more easily customize the look and feel of the application, such as adding an icon to the rows that is a hotspot to delete the row, and floating the input div wherever you want it on the page. This method requires a bit of planning, but the logic is very straightforward.
If I understand correctly, you need to display varying number of rows on a form. Each row will have fields to display questions and to accept answers.
You can create say 50 rows on a form. Using hide conditions how as many rows as you want, hide the rest.
This should work and will be simplest way. But it has limiation that the cap size 50 is defined at database design time, and can’t be altered by an end user.
Another approach is to use a single row of multi-valued field with careful manipulation of font & style. The rows may appear not propely aligned when length of text changes. Using a fixed width font, and padding with trailing spaces etc can help achive proper alignment.
And a more refined approach is to save each user-answer into individual documents. ie, if survey has 35 questions, there will be 35 documents per user. And the Form should only display one question at a time.