close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Checking for Duplicate Student ID

Thread began 7/12/2015 7:39 am by salaroche | Last modified 7/20/2015 1:08 pm by Ray Borduin | 476 views | 11 replies |

salaroche

Checking for Duplicate Student ID

Hi:

I need to check for duplicate Student ID at the moment of data entry. Is there a DA Behavior that can do that? And, if so, how is it applied to the S. ID field?

Thank you for your attention

Sign in to reply to this post

Ray BorduinWebAssist

You can use Server Validation to do this. There is a Duplicate Record validation you can use to validate the value doesn't already exist in the database.

Sign in to reply to this post

salaroche

Ray:

I've tried more than a couple of times using the Server Validation behavior and I always get the following error message:

Fatal error: Call to undefined function WAValidateAN() in C:\xampp\htdocs\StuRex.com\StuRexInsert.php on line 30

Any suggestions?

Attached please find a copy of the page in question

Thank you for your attention

Attached Files
StuRexInsert.php
Sign in to reply to this post

Ray BorduinWebAssist

Dreamweaver put the includes in the wrong spot. Move lines37-40 to the top of the page.

Sign in to reply to this post

salaroche

Ray:

I moved lines 37-40 to the top of the page as you suggested and now the error message is gone, but the Student ID field is accepting duplicate ID codes. I’ve entered an already-existing ID twice and DW took it both times.

Any suggestions?

Attached please find a copy of the page in question

Thank you for your attention

Attached Files
StuRexInsert.php
Sign in to reply to this post

Ray BorduinWebAssist

It looks like you just have Alpha-numeric validation on that field... you need to add "Unique value in database" validation to validate it is unique.

Sign in to reply to this post

salaroche

Ray:

There is no option “Unique value in database” in the Server Validation list (please see attachment) I tried entering it manually but I get the following error message:

Parse error: syntax error, unexpected 'value' (T_STRING) in C:\xampp\htdocs\StuRex.com\StuRexInsert.php on line 35

Line 35: $WAFV_Errors .= WAValidateRQ(Unique value in database . "",false,2);

Any suggestion would be appreciated.

Thank you for your attention

Sign in to reply to this post

Ray BorduinWebAssist

It looks like you are using an older version of Validation Toolkit that doesn't include the new validation option. It would be available if you upgraded to Data Bridge.

In your version you have to do it manually. You would add a recordset filtered by the unique value. Then you can use server validation on the number of rows that are returned and make sure it is less than 1, which means it doesn't already exist.

You should be able to find examples of this on our forums, or get as far as you can and post back when you have questions.

Sign in to reply to this post

salaroche

Ray:

OK. Thank you for your attention.

Sign in to reply to this post

salaroche

Ray:

I found a thread in the Webassist forums that gives rather clear instructions on how to have DW execute the Server Validation in question. I’ve tried it a couple of times and now the sequence rejects ALL ID codes that I enter.

Any suggestions will be much appreciated.

Attached please find a copy of the page in question.

BTW: The thread with the instructions is the following:

http://www.webassist.com/forums/posts.php?t=19462

Thank you for your attention

Attached Files
StuRexInsert.php
Sign in to reply to this post
loading

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...