close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Check for duplicate before insert

Thread began 4/07/2012 10:04 pm by dvan_zelst | Last modified 4/09/2012 9:12 am by toms016390756 | 1358 views | 3 replies |

dvan_zelst

Check for duplicate before insert

Hi,

I was wondering if there is any simple guide or tutorial on how to implement a check to prevent a simple form from inserting its values to the database if there is a duplicate?

I created an simple insert form and set in my database the 'name' column to be unique.
I used a DataAssist insert behavior to insert the form values into the database.
How can i make the insert behavior to first check the 'name' field for duplicates before really inserting and if there is already a dulicate to show the message that the name already exist and need to choose another name.

Does this involve handcoding or does DataAssist has such feature inside to check first.

I hope someone can give some easy tutorial how to do this.

Thanks.

Sign in to reply to this post

dvan_zelst

Ok, i figured it out how to do it, works nicely!

I just had to move the lookup record set above all the validation code otherwise it would not let me insert any values and always showed the error validation for the lookup.
Now it is working like a charm.

Just one question, when i enter some error message and select it to create the showif behavior it will generate the code nicely. I just wonder if you always need to select the correct class in the property inspector to create the same span tag with the same look like the other error messages which were created when inserting the form.
Also i found when selecting this class manually it does create the correct look but does not insert the id field, has this to be coded by hand as well?

Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

yes, the span tag will need to added to the message after it is added.

Sign in to reply to this post

toms016390756

this helped me




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