close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Check Username- How?

Thread began 4/09/2012 5:38 am by thehalpeen319342 | Last modified 5/24/2012 9:28 am by Jason Byrnes | 3997 views | 4 replies |

thehalpeen319342

Check Username- How?

I set up a simple customer database (to be used internally in my office) using DataAssist. One of the fields is email. I want to prevent staff from entering a customer with an email that is already on the system. So, I want to insert a new customer, but i want the system to check if this customer already exists by checking the e-mail. When I use Dreamweavers 'check new username' it pops up the following message " This server behaviour requires the presence of the Insert Record behaviour on the page. Add an Insert Record behaviour and try again.". So how can I 'check new username' with DataAssist - in order to prevent duplicate enteries?

Sign in to reply to this post

Jason ByrnesWebAssist

you can do this with a recordset and the numeric validation type in the Server Validations server behavior.

See this post for details:
showpost.php?p=72364&postcount=2

Sign in to reply to this post

toms016390756

Thanks for posting the link…I had the same question




Sign in to reply to this post

thehalpeen319342

Recordset and Server behaviour not working

I've tried to follow the instructions on your link. I've created a recordset - see attached screenshot and I've created a server behaviour - see screenshot. I've also provide you with a screenshot of my server behaviors panel. However, now I can't even insert a record, never mind try and prevent a duplicate email from being entered. Where am I going wrong?

Sign in to reply to this post

Jason ByrnesWebAssist

in your server behaviors list, you can see that the recordset comes after the Server validations behavior, it needs to be before the server validations behavior.

you will need to arrange the code so that the server validation behavior is after the recordset.

Sign in to reply to this post

thehalpeen319342

Jason, with a bit of cutting and pasting of the code, I was able to solve the issue with the 'duplicate e-mail'. However, it has now presented another issue. If the staff members enters in an e-mail that is not in the database, I can redirect them to a success page. However, if the email already exists, it just re-presents the insert page and it's not clear that the email exists in the database. How do I redirect the user to a page/message where I can let them know that a duplicate exists and the database has not been updated?

Sign in to reply to this post

Jason ByrnesWebAssist

edit the Server validation behavior and set a page for the failed redirect.

or you could use the Validation Show If Behavior to show an error message when validation fails.

Sign in to reply to this post

thehalpeen319342

Thanks for that. It worked. It appears to me that while Web Assist makes the task of preparation dynamic databases pretty easy - I have found that including server validations requires a good knowledge of Dreamweaver and php - something I was hoping I didn't really need to have with Web Assist. The wizards, do a good job at preparing the php files, but they are 'basic' or 'raw'. Things like checking for duplicate entries, validating that e-mails are in e-mail format, double-op in or out (confirming e-mails) do not appear straight forward to me. Am I missing something?

Sign in to reply to this post

Jason ByrnesWebAssist

The WebAssist extensions are developer tools. They don't necessarily require a good understanding of the PHP programing language, but like any tool, it does require a good understanding of the practices to get the desired result.


The WebAssist Extensions build off of what is available in Dreamweaver, so a good understanding of Dreamweaver is a definite plus.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...