automatically generating order numbers in fields

K

kevin

I have created an order form for my customers using FP200.
how can i generate a unique order number in the results
each time a person makes an order

thanks in advance
 
M

Mike Mueller

: I have created an order form for my customers using FP200.
: how can i generate a unique order number in the results
: each time a person makes an order
:
: thanks in advance

How are you storing the information? If you are using
Access then there should be an ID field which would be an
autonumber.

Mike
 
K

Kevin

Thanks for your reply Mike
I'm a novice with Access and have minimal programming
experience, therefore the information is stored in the
generic text file that is sent to me via e-mail.
I don't expect you to give me a class on Access, but any
advice will be greatly appreciated.

thanks again
 
M

Mike Mueller

If you are just generating the email text file, about all
you can do is generate a number for him when the order is
entered on your end. With Access, the information would all
be stored from the form. You can set up the form to make a
new DB, and it will generally have an ID number when it is
created. The ID will be a unique key for each record.
Besides form data, it can also collect the IP, time, date
along with some other items which may be of help later. The
bad thing about DBs is that all of this information is
saved, and VISA etc say that you cannot store CIDs in any
manner. There are poeple out her much better at this than
I, I am new to FP.

Mike


: Thanks for your reply Mike
: I'm a novice with Access and have minimal programming
: experience, therefore the information is stored in the
: generic text file that is sent to me via e-mail.
: I don't expect you to give me a class on Access, but any
: advice will be greatly appreciated.
:
: thanks again
:
:: -----Original Message-----
::: I have created an order form for my customers using
::: FP200. how can i generate a unique order number in the
::: results each time a person makes an order
:::
::: thanks in advance
::
:: How are you storing the information? If you are using
:: Access then there should be an ID field which would be an
:: autonumber.
::
:: Mike
::
::
:: .
 
M

MD WebsUnlimited.com

Hi Kevin,

Without changing your present setup create an additional form field to hold
the order number.

<input type="text" name="OrdNumber" value=""
onfocus="this.form.NextField.focus(); >

Then add the following code to the body tag

<body onload="onload="oDate = new Date(); FrontPage_Form1.OrdNumber.value =
'#' + oDate.getTime(); " >


In the field OrdNumber notice the onfocus handler. Change NextField to the
name of the field follow or proceeding this field. This will prevent your
visitor from changing the the order number.

HTH,
 
K

Kevin

i followed your instructions to the "t" however, frontpage
(2000) keeps giving me an order number of "1" every time i
submit the form. anyway, if you have the time, here is the
HTML for the page in question and a sample of the results:

<html>

<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>page1</title>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="Microsoft Theme" content="fiesta 101, default">
<meta name="Microsoft Border" content="t, default">
</head>

<body><form method="POST" action="--WEBBOT-SELF--"
onSubmit="return FrontPage_Form1_Validator(this)"
name="FrontPage_Form1">
<!--webbot bot="SaveResults" U-
File="_private/form_results.txt"
S-Format="TEXT/CSV" S-Label-Fields="TRUE" B-Reverse-
Chronology="FALSE"
S-Email-Format="TEXT/PRE"
S-Email-Address="karnold101%
(e-mail address removed)"
B-Email-Label-Fields="TRUE" B-Email-Subject-From-
Field="FALSE"
S-Email-Subject="Kaier Lab Coat Order" S-Date-Format="%
m/%d/%Y"
S-Time-Format="%I:%M %p" S-Builtin-Fields="Date Time"
S-Form-Fields="entity_ location_ expensecode_ OrderedBy_
Telephone_Number_ coat_style_ coat_size_ quantity_
embroidery_line1 embroidery_line2 embridery_line3
order_number1 "
U-Confirmation-Url="confirmation_page.htm" --><p
align="left">&nbsp;</p>
<p align="left"><b>*Entity <!--webbot bot="Validation" B-
Value-Required="TRUE"
I-Minimum-Length="2" I-Maximum-Length="2" --> <input
type="text" name="entity_" size="2" maxlength="2"> Location
<!--webbot bot="Validation" B-Value-Required="TRUE" I-
Minimum-Length="3"
I-Maximum-Length="3" --> <input type="text"
name="location_" size="3" maxlength="3">Expense
Code<!--webbot bot="Validation" B-Value-Required="TRUE"
I-Minimum-Length="4"
I-Maximum-Length="4" --><input type="text"
name="expensecode_" size="4" maxlength="4"></b></p>
<p align="left"><b>Ordered By <input type="text"
name="OrderedBy_" size="17">Contact
Number<input type="text" name="Telephone_Number_"
size="20"></b></p>
<p align="left">&nbsp;</p>
<p align="left"><b>Custom Embroidered Text Shows Company
Name, Name, Title
&amp; Suffix</b></p>
<p align="left"><b>Style:<select size="1"
name="coat_style_">
<option selected>Select Your Lab Coat Style</option>
<option>1346 Unisex 40&quot; Lab Coat</option>
<option>1346T_Tall 45&quot; Unisex Lab Coat</option>
<option>1389 Consultant Coat</option>
</select> Size <select size="1" name="coat_size_">
<option selected>XS</option>
<option>S</option>
<option>M</option>
<option>L</option>
<option>XL</option>
<option>2X</option>
<option>3X</option>
<option>4X</option>
<option>5X</option>
</select> Quantity<!--webbot bot="Validation" B-Value-
Required="TRUE"
I-Minimum-Length="1" I-Maximum-Length="3" --><input
type="text" name="quantity_" size="2" value="1"
maxlength="3"></b></p>
<p align="left"><b>Embroidery Information</b></p>
<p align="left"><b>&nbsp;<font
color="#FF0000">Line1</font>&nbsp;&nbsp;&nbsp;
Company Name:&nbsp; <input type="text"
name="embroidery_line1" size="20"> </b></p>
<p align="left"><b>&nbsp;<font
color="#FF0000">Line2</font>&nbsp;&nbsp;&nbsp;&nbsp;Name/Ti
tle&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;
<input type="text" name="embroidery_line2"
size="20"></b></p>
<p align="left"><b>&nbsp;<font
color="#FF0000">Line3</font>&nbsp;&nbsp;&nbsp;

Name/Title&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp; <input type="text" name="embridery_line3"
size="20"></b></p>
<p align="left"><b>&nbsp; <input type="text"
name="order_number"
onfocus="this.form.embridery_line3.focus();" size="20">
&nbsp;</b></p>
<p align="center"><input type="submit" value="Submit"
name="B1"><input type="reset" value="Reset" name="B2"></p>
<p align="center">&nbsp;</p>
</form>

<p>&nbsp;</p>

</body onload="onload="oDate= new date();
FrontPage_Form1.order_number.value='#' + oDate.getTime();">

</html>

results:
***********************************************************
*****************
***
entity_: 77
location_: 777
expensecode_: 7777
OrderedBy_: 777
Telephone_Number_: 77
coat_style_: Select Your Lab Coat Style
coat_size_: XS
quantity_: 1
embroidery_line1: 77
embroidery_line2: 77
embridery_line3: 77
order_number1:
Date: 09/05/2003
Time: 09:53 PM

thanks for your time
-----Original Message-----
Hi Kevin,

Without changing your present setup create an additional form field to hold
the order number.

<input type="text" name="OrdNumber" value=""
onfocus="this.form.NextField.focus(); >

Then add the following code to the body tag

<body onload="onload="oDate = new Date();
FrontPage_Form1.OrdNumber.value =
 
M

MD WebsUnlimited.com

The script is in the ending of the body tag it should be in the body tag:
<body>

not this
</body onload="onload="oDate= new date();
FrontPage_Form1.order_number.value='#' + oDate.getTime();">
 
K

kevin

sorry about that
thanks for sticking with me.

for some reason, frontpage keeps changing your code to the
following line and i still keep getting 1 in the results:

<body onload="onload" Date();
FrontPage_Form1.order_number.value = '#' + oDate.getTime
(); " oDate="new">
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top