//Check if the user has pressed the submit button
//If Yes validate and insert the contact type into the contatcttype table
if form(AddContact)
if form(txtContactType)
//open the an instance of the contatcttype table for inserting data
table contype=contacts.contacttype
//Check if the contact exists
select from contype where contacttype={txtContactType}
if contype(selected)>"0"
"Contact type already exist
"
over
endif
//assgin all the input values to respective fields.
contype(contacttype)=form(txtContactType)
// insert the record
contype(insert)
//Check if the records was succesfully inserted
if contype(recordno)>"0"
"Contact Type added succesfully
"
else
"Error occured while inserting record !!
"
endif
else
//Give an error messsage to the user
"Contact type cannot be Empty
"
endif
//end further execution
over
endif
include sample_top.html
Caravan
Business Server>Examples>Date & Time Variables |
|
|
|
include sample_bottom.html