Forums
This topic is locked
trying to build a questionnaire
Posted 21 Oct 2001 00:19:44
1
has voted
21 Oct 2001 00:19:44 neil train posted:
trying to build a questionnairei'm attempting an application to allow a group of people to fill in a pretty simple questionnaire, but the basic ultradev tutorials leave me with several issues which can't be tackled with simple form objects. I think I need some BASIC ASP or SQL commands - basic so that I understand them! I purchased ultradev because although i have an interest in learning ASP/SQL , I hoped to be able to do this in my own time and have ultradev do the hard work on this project! ( i have about 10 days, so a comfy armchair, pipe & slippers and a 2000 page reference book aren't going to cut it!)
Issue1: The user is asked for their name (i have a drop-down list) and the name of the person they are scoring (the questionnaire asks questions about their peers). I need to ensure that firstly they are not rating the same person twice, and if allowed to proceed, that a record is changed from a "0" to a "1" so that if they try again they won't be able to. How do I catch the info about the two names, grab the record which either allows/prevents this questionnaire being filled in, and then inserting a "1" into the record?
Issue 2:
Again, the same variables (username, name of person being scored) are needed, as there are different relationships between people. If the relationship, taken from another table in my db is "boss" (although i'm using numerical values 1 for boss, 2 for peer, 3 for customer etc.etc.) then the user is directed to a form that inserts data into a BOSS table. likewise for the other relationships. Basically, i need to redirect based on a value taken from one of my tables. More programming needed, I fear!!
Issue 3:
OK, we're rolling now. The form is created, the data is being inserted into the relevaznt table. HOWEVER, this is a questionnaire that various people can fill in, so my records are going to be written over every time!
What I need (again) is a method to extract the original value from the record, add the value being submitted by the user, and putting the sum of the two back into the record. eg. current value in the field is 17. the user is inputting a "4" score. The record should be updated to read 21, and not four.
OK, actually that's it- and my apologies if it made no sense hatsoever! A bit of a mouthful, but I'd really appreciate some help. There may even be a totally different and far superior way to build all this.
The key to this is that although I can insert & display data, i can't perform the operations necessary here which require the data to be called and questioned, action taken but not used in forms at all.