{"id":152,"date":"2017-03-06T01:09:57","date_gmt":"2017-03-05T23:09:57","guid":{"rendered":"http:\/\/geekinto.com\/?p=152"},"modified":"2017-03-06T01:17:54","modified_gmt":"2017-03-05T23:17:54","slug":"oracle-apex-how-to-avoid-insert-same-values-into-tabular-form-js-client-side","status":"publish","type":"post","link":"https:\/\/howoracleapex.com\/?p=152","title":{"rendered":"Oracle APEX | How to avoid insert same values into tabular form [JS Client side] ?"},"content":{"rendered":"<p>Welcome,<\/p>\n<p>Current Issue is:<br \/>\nYou want user can&#8217;t insert value he inserted same that value before by JS [Client Side without submit page].<\/p>\n<p>Just Edit next code with requests I write it into next PICs.<\/p>\n<pre class=\"lang:js decode:true \">function checkValues(pThis){\r\n\r\n\t\/\/Just please write column name into colName in our example = f03 &amp; write youw message alert into msgAlert\r\n\t\/\/Configuratin\r\n\tvar colName = 'f03';\r\n\tvar msgAlert = 'I find match same value you inserted before, #Sorry i will be delete current row !';\r\n\r\n\t\/\/Declaration \r\n\tvar rowId= pThis.id.substr(4);\r\n\tvar\tchkVal = $('#'+colName+'_'+rowId).val();\r\n\tvar colArray = [];\r\n\tvar chkArray = [];\r\n\r\n\t\/\/Fill column with current values..\r\n\tvar colArray = $('[name=\"'+colName+'\"]').map(function(){\r\n\t       \t\t\treturn $(this).val();\r\n\t   \t\t\t\t}).get();\r\n\r\n\t\/\/Return clear values..\r\n\tvar chkArray = $('#CHK_ARRAY').val().split(\",\");\r\n\r\n\t\/\/Checking Now..\r\n\tif(jQuery.inArray(chkVal, chkArray) !== -1){\r\n\t\tapex.message.alert(\r\n\t\t\tmsgAlert\r\n\t\t\t, function(){\r\n\t\t\t\t$('#'+colName+'_'+rowId).closest(\"tr\").remove();\r\n\t\t\t});\r\n\t} else{\r\n\t\t$('#CHK_ARRAY').val(colArray);\r\n\t}\r\n\r\n\t\/\/Regards &amp; All thanks just only for ALLAH.\r\n\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>Steps ..<br \/>\n<a href=\"http:\/\/geekinto.com\/wp-content\/uploads\/2017\/03\/1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-153\" src=\"http:\/\/geekinto.com\/wp-content\/uploads\/2017\/03\/1.png\" alt=\"\" width=\"1365\" height=\"676\" \/><\/a> <a href=\"http:\/\/geekinto.com\/wp-content\/uploads\/2017\/03\/2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-154\" src=\"http:\/\/geekinto.com\/wp-content\/uploads\/2017\/03\/2.png\" alt=\"\" width=\"1365\" height=\"622\" \/><\/a> <a href=\"http:\/\/geekinto.com\/wp-content\/uploads\/2017\/03\/3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-155\" src=\"http:\/\/geekinto.com\/wp-content\/uploads\/2017\/03\/3.png\" alt=\"\" width=\"1365\" height=\"586\" \/><\/a> <a href=\"http:\/\/geekinto.com\/wp-content\/uploads\/2017\/03\/6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-156\" src=\"http:\/\/geekinto.com\/wp-content\/uploads\/2017\/03\/6.png\" alt=\"\" width=\"1365\" height=\"615\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Save &amp; Check Now.. \ud83d\ude42<\/p>\n<p>&nbsp;<\/p>\n<p>Regards,<\/p>\n<p>Amr<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome, Current Issue is: You want user can&#8217;t insert value he inserted same that value before by JS [Client Side without submit page]. Just Edit next code with requests I write it into next&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,14,13,12,2],"tags":[],"class_list":["post-152","post","type-post","status-publish","format-standard","hentry","category-apex","category-html","category-jquary","category-jscript","category-oracle"],"_links":{"self":[{"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/posts\/152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=152"}],"version-history":[{"count":4,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/posts\/152\/revisions"}],"predecessor-version":[{"id":160,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/posts\/152\/revisions\/160"}],"wp:attachment":[{"href":"https:\/\/howoracleapex.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}