Page 1 of 1

Check duplicate on the fly

Posted: Mon Jul 16, 2012 6:00 am
by Danny

Hi, it would be nice if we enable "Check duplicate", the check is "On the fly" javascript, so that you don't have to fill the complete form, before you see any duplicate message.

  1. We put an onchange event into Custom Attributes.
  2. Client Script, Client script, Addpage:

function checkduplicate() {
var lst =document.getElementById("x_Text2").Value;
.............................?
{
alert("Duplicate value found !");
}
else
{
alert("No Duplicates !");
}
}

How we can check the ("x_Text2") field in the database by Javascript?

Regards, Danny


Re: Check duplicate on the fly

Posted: Mon Jul 16, 2012 11:33 am
by Webmaster

Currently this is not supported. You need to write the javascript to issue a server request (AJAX) to the server (so a corresponding server page) to verify if the record is duplicated.


Re: Check duplicate on the fly

Posted: Tue Jul 17, 2012 6:34 am
by Danny

Hi,

We add the ajax code to the script:

function checkduplicate() {
var lst =document.getElementById("x_Text2").Value;

var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("x_Text2").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","?????????????????????.aspx",true);
xmlhttp.send();

{
alert("Duplicate value found !");
}
else
{
alert("No Duplicates !");
}
}

What do we need more to check the field x_text2 against the database ?

Regards, Danny


Re: Check duplicate on the fly

Posted: Tue Jul 17, 2012 9:39 am
by Webmaster

As explained, you need to write your own server side page (*.aspx) to perform the validation.


Re: Check duplicate on the fly

Posted: Mon Jan 15, 2018 4:31 pm
by Danny

Hi,

You said: Currently this is not supported.

Is it easier with version 2018 now ?

Regards,


Re: Check duplicate on the fly

Posted: Mon Jan 15, 2018 5:24 pm
by Webmaster

No, not yet supported.

For feature request, please post to the Feature Requests board for our future consideration. Thank you.