|
| |
|
|
nathan4
Posts: 24 Joined: 1/30/2004 Status: offline
|
database confirmation number - 1/30/2004 0:20:47
Hi everyone, I ma new to this forum and also new to frontpage. I have a question like this: I am trying to make a form for employees at my workplace to fill in this form to post his/her problems such as networking or computer problems so that the technicians will view and fix the problems in order. I can make a form and create a db result page and a confirmation page with no probplem. But the only problem I have is that how can I create a confirmation page with a given order number or a reference number for each person after he/she submits the form so that they can enter this number to check to see if their problems have been fixed and the database will pull up the problems submitted based on the entered order number??? Hope I explained well enough here. Please help!!!!!!!!! Also to keep in mind that each click on the submit button will create a new order numer. Thanks!!!!!! nathan
|
|
|
|
Mike54
Posts: 4790 Joined: 3/26/2001 From: Way Up Over Status: online
|
RE: database confirmation number - 1/30/2004 6:00:43
Hi nathan4 and welcome to Outfront. Create a new page and use the DRW to have it return the results of the submission to the database including the "order number". Save it (as an ASP page) and in your submission form change the confirmation page to point at the new page you just created.
_____________________________
Who was the first guy that looked at a cow and said, "I think that I'll drink whatever comes out of those things when I squeeze them"? New photogalleries, stop by sometime.
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: database confirmation number - 1/30/2004 8:38:42
If you want the "order number" to be the same as the auto-id generated by the db, you could use this tutorial to do what you need: http://www.outfront.net/spooky/adv_new_id.htm
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
JackD
Posts: 83 Joined: 9/26/2003 Status: offline
|
RE: database confirmation number - 1/30/2004 10:55:00
It sounds like he wants the ID to be part of the normal confirmation page with the rest of the information. I would like to know how to do the same thing.
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: database confirmation number - 1/30/2004 12:19:09
quote:
It sounds like he wants the ID to be part of the normal confirmation page with the rest of the information. I would like to know how to do the same thing. That's exactly what the above tutorial allows you to do. I changed the confirmation portion to this: FP_FormConfirmation "text/html; charset=windows-1252",_ "Form Confirmation",_ "Thank you for submitting the following information. The ID number for this record is "&NewId&".",_ "new_page_2.asp",_ "Return to the form." Hope it helps.
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
nathan4
Posts: 24 Joined: 1/30/2004 Status: offline
|
RE: database confirmation number - 1/30/2004 12:49:35
Hello and thanks for all of your support. I will look at the tutorial given and let you know. I hope it helps and exactly what I need. To go back to the problem I posted, yes it can be an id number but it has to show on the confirmation page so that one can know like this is his/her case number and they can go back anytime to enter this case number to see the status on the database results(actually how can I do this?) . speaking of database results, it leads to another problem like how can a technician change the status from pending to complete when a person checks his/her case? Thanks again. Nathan
|
|
|
|
JackD
Posts: 83 Joined: 9/26/2003 Status: offline
|
RE: database confirmation number - 1/30/2004 12:52:24
quote:
ORIGINAL: betheball FP_FormConfirmation "text/html; charset=windows-1252",_ "Form Confirmation",_ "Thank you for submitting the following information. The ID number for this record is "&NewId&".",_ "new_page_2.asp",_ "Return to the form." What exactly would this look like on the browser?
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: database confirmation number - 1/30/2004 12:53:35
Forgive another tutorial. You simply create a form with which you edit the db. The form contains the fields you wish to edit and then submits to a page that contains the SQL that does the actual editing. Our resident expert, Spooky, wrote this tutorial: http://www.outfront.net/spooky/update.htm
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: database confirmation number - 1/30/2004 12:55:10
quote:
ORIGINAL: JackD quote:
ORIGINAL: betheball FP_FormConfirmation "text/html; charset=windows-1252",_ "Form Confirmation",_ "Thank you for submitting the following information. The ID number for this record is "&NewId&".",_ "new_page_2.asp",_ "Return to the form." What exactly would this look like on the browser? Here is an example: Form Confirmation Thank you for submitting the following information. The ID number for this record is 10. T1: Hello B1: Submit Return to the form.
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
nathan4
Posts: 24 Joined: 1/30/2004 Status: offline
|
RE: database confirmation number - 1/30/2004 13:09:39
Hello again, I checked the tutorial above but it so confusing that I have to change the code, delete the lines and add some all don't come out right! Can someone show me an easier way since I am not good at this? Thanks. Nathan
|
|
|
|
JackD
Posts: 83 Joined: 9/26/2003 Status: offline
|
RE: database confirmation number - 1/30/2004 13:15:02
I'm not that good yet, either, dude. hehe. I'm still trying to figure out the same stuff. I don't want field after field in my confirmation forms. My users don't understand that stuff.
|
|
|
|
nathan4
Posts: 24 Joined: 1/30/2004 Status: offline
|
RE: database confirmation number - 1/30/2004 13:15:49
Sorry, forget the update for now. I want to be able to create a confirmation page with an id number as Betheball mentioned "Form Confirmation Thank you for submitting the following information. The ID number for this record is 10. T1: Hello B1: Submit " How do I do this?
|
|
|
|
JackD
Posts: 83 Joined: 9/26/2003 Status: offline
|
RE: database confirmation number - 1/30/2004 13:17:57
Betheball, In that last tutorial you posted.. what does the DISTINCTROW indicate in the update query? One example had it, the other didn't.
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: database confirmation number - 1/30/2004 14:59:20
quote:
ORIGINAL: nathan4 Sorry, forget the update for now. I want to be able to create a confirmation page with an id number as Betheball mentioned "Form Confirmation Thank you for submitting the following information. The ID number for this record is 10. T1: Hello B1: Submit " How do I do this? Nathan, post the html code for your current page, and I will show you where you need to make changes. OK?
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
nathan4
Posts: 24 Joined: 1/30/2004 Status: offline
|
RE: database confirmation number - 2/2/2004 15:42:17
Hi, Here's my html code of the form: <% ' FP_ASP ASP Automatically generated by a Frontpage Component. Do not Edit. On Error Resume Next strErrorUrl = "" If Request.ServerVariables("REQUEST_METHOD") = "POST" Then If Request.Form("VTI-GROUP") = "0" Then Err.Clear Set fp_conn = Server.CreateObject("ADODB.Connection") FP_DumpError strErrorUrl, "Cannot create connection" Set fp_rs = Server.CreateObject("ADODB.Recordset") FP_DumpError strErrorUrl, "Cannot create record set" fp_conn.Open Application("Task report_ConnectionString") FP_DumpError strErrorUrl, "Cannot open database" fp_rs.Open "Results", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable FP_DumpError strErrorUrl, "Cannot open record set" fp_rs.AddNew FP_DumpError strErrorUrl, "Cannot add new record set to the database" Dim arFormFields0(6) Dim arFormDBFields0(6) Dim arFormValues0(6) arFormFields0(0) = "AdditionalComments" arFormDBFields0(0) = "AdditionalComments" arFormValues0(0) = Request("AdditionalComments") arFormFields0(1) = "ITProblem" arFormDBFields0(1) = "ITProblem" arFormValues0(1) = Request("ITProblem") arFormFields0(2) = "Department" arFormDBFields0(2) = "Department" arFormValues0(2) = Request("Department") arFormFields0(3) = "Associatename" arFormDBFields0(3) = "Associatename" arFormValues0(3) = Request("Associatename") arFormFields0(4) = "TaskGivenTo" arFormDBFields0(4) = "TaskGivenTo" arFormValues0(4) = Request("TaskGivenTo") arFormFields0(5) = "Status" arFormDBFields0(5) = "Status" arFormValues0(5) = Request("Status") FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0 FP_SaveFieldToDB fp_rs, Now, "Timestamp" fp_rs.Update FP_DumpError strErrorUrl, "Cannot update the database" fp_rs.Close fp_conn.Close Session("FP_SavedFields")=arFormFields0 Session("FP_SavedValues")=arFormValues0 Response.Redirect "Task assignment results.asp" End If End If %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>task report</title> <meta name="Microsoft Theme" content="cool-dotted 011"> </head> <body> <p> </p> <table border="0" width="100%" cellspacing="1" cellpadding="0"> <tr> <td width="100%"> <p align="center"><img border="0" src="../images/IT_task_report.jpg" width="432" height="46"></td> </tr> </table> <hr align="center"> <p align="center"><font color="#FF0000">Use The Form Below To Submit Your Inquiries. The I.T. Department Will Solve Your Problem(s) In the Order It's Received.<br> </font> </p> <form method="POST" action="--WEBBOT-SELF--" onSubmit=""> <!--webbot bot="SaveDatabase" startspan SuggestedExt="asp" S-DataConnection="Task report" S-RecordSource="Results" U-Database-URL="../fpdb/Task report.mdb" U-Confirmation-Url="Task assignment results.asp" S-Builtin-Fields="Timestamp" S-Builtin-DBFields="Timestamp" S-Form-Fields="AdditionalComments ITProblem Department Associatename TaskGivenTo Status" S-Form-DBFields="AdditionalComments ITProblem Department Associatename TaskGivenTo Status" U-ASP-Include-Url="../_fpclass/fpdbform.inc" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include file="../_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" endspan --><table border="0" width="105%" cellspacing="10" cellpadding="0"> <tr> <td width="17%" align="center"></td> <td width="6%" align="center"></td> <td width="31%" align="left"><b><font face="Arial" color="#FF0000">Associate Name:</font></b></td> <td width="18%" align="left"><input type="text" name="Associatename" size="40"></td> <td width="16%" align="center"></td> <td width="16%" align="center"></td> </tr> <tr> <td width="17%" align="center"></td> <td width="6%" align="center"></td> <td width="31%" align="left"><b><font face="Arial" color="#FF0000">Department:</font></b></td> <td width="18%" align="left"><input type="text" name="Department" size="40"></td> <td width="16%" align="center"></td> <td width="16%" align="center"></td> </tr> <tr> <td width="17%" align="center"></td> <td width="6%" align="center"></td> <td width="31%" align="left"><b><font face="Arial" color="#FF0000">Task Assigned To:</font></b></td> <td width="18%" align="left"><input type="text" name="TaskGivenTo" size="40"> First name only</td> <td width="16%" align="center"></td> <td width="16%" align="center"></td> </tr> <tr> <td width="17%" align="center"></td> <td width="6%" align="center"></td> <td width="31%" align="left"><b><font face="Arial" color="#FF0000">I.T. Problem:</font></b></td> <td width="18%" align="left"><textarea rows="4" name="ITProblem" cols="70"></textarea></td> <td width="16%" align="center"></td> <td width="16%" align="center"></td> </tr> <tr> <td width="17%" align="center"></td> <td width="6%" align="center"></td> <td width="31%" align="left"><b><font face="Arial" color="#FF0000">Additional Comments:</font></b></td> <td width="18%" align="left"><textarea rows="4" name="AdditionalComments" cols="70"></textarea></td> <td width="16%" align="center"></td> <td width="16%" align="center"></td> </tr> <tr> <td width="17%" align="center"></td> <td width="6%" align="center"></td> <td width="31%" align="left"><b><font face="Arial" color="#FF0000">Status:</font></b></td> <td width="18%" align="left"><input type="text" name="Status" size="40" value="Pending"></td> <td width="16%" align="center"></td> <td width="16%" align="center"></td> </tr> <tr> <td width="104%" align="center" colspan="6"> <p align="center"> </p> <hr align="center"> <p align="center"><b><font face="Arial" color="#FF0000"> </font></b></p> <p> </p> </td> </tr> </table> <p align="center"><br> <input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p> </form> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="100%"><p align="center"> <a href="Task%20assignment%20results%20all.asp"><img border="0" src="../images/check_task_results.jpg"></a> </td> </tr> </table> <p align="left"><font color="#FF0000"><input type="button" value="Back" onClick="history.go(-1)"><input type="button" value="Forward" onClick="history.go(+1)"> </font><br> </p> <hr align="center"> </body> </html> Thanks, Betheball
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: database confirmation number - 2/3/2004 11:36:18
Let's see if we can answer your question about adding a form field and this question all at once. Step 1 - Open your page in Normal view and add your new form field. Step 2 - Right-click your form and choose "Form Properties". Click the "Options" button. Then click the "Update Database" button. (Note: If you have already added the new field to the database, this step is not necessary.) Step 3 - Save the page Step 4 - Refresh the page and switch to HTML view. Then, near the top of the page, find and delete this line: ' FP_ASP ASP Automatically generated by a Frontpage Component. Do not Edit. Step 5 - Find this block of mostly gray code: <!--webbot bot="SaveDatabase" startspan SuggestedExt="asp" S-DataConnection="Task report" S-RecordSource="Results" U-Database-URL="../fpdb/Task report.mdb" U-Confirmation-Url="Task assignment results.asp" S-Builtin-Fields="Timestamp" S-Builtin-DBFields="Timestamp" S-Form-Fields="AdditionalComments ITProblem Department Associatename TaskGivenTo Status" S-Form-DBFields="AdditionalComments ITProblem Department Associatename TaskGivenTo Status" U-ASP-Include-Url="../_fpclass/fpdbform.inc" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include file="../_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" endspan --> Delete all the gray code, except this: <!--#include file="../_fpclass/fpdbform.inc"--> Step 6 - Find these two lines: fp_rs.Update FP_DumpError strErrorUrl, "Cannot update the database" And add this line in between them: NewID = fp_rs(0) Step 7 - Change this line: Response.Redirect "Task assignment results.asp" To: Response.Redirect "Task assignment results.asp?ID="&NewID Save the page. Now, this will enable you to send the ID of the new record to your Task Assignment Results page so you can add a database results region with criteria in your SQL of WHERE ID = ::ID:: and you can show any information you want from the new record. Does that make sense?
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
nathan4
Posts: 24 Joined: 1/30/2004 Status: offline
|
RE: database confirmation number - 2/3/2004 12:05:19
Thanks Betheball. That worked!!!
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: database confirmation number - 2/3/2004 12:12:24
I must have gotten lucky. Usually when I give an answer that long, a typo or bad cut and paste slips in somewhere. Glad it helped.
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
JackD
Posts: 83 Joined: 9/26/2003 Status: offline
|
RE: database confirmation number - 2/3/2004 12:15:43
Worked for me, too... best explanation I've heard yet. Thanks.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|