DMXzone App Connect Support Product Page
Answered
Add validate data
Asked 06 Aug 2017 20:22:06
1
has this question
06 Aug 2017 20:22:06 Charles cruise posted:
I'm not sure if I am missing something or not, but I followed the video tutorial "Check if a Record Already Exists in Your Database" to add validation to see if a record already exists. I believe i have everything setup right, since it's so simple, but when I enter data that already exists, no message shows up.Under DMXzone App Connect, for the form i have a dynamic event setup that resets the form on success entry into database. I also have a required validation rule for the text field setup.
Under DMXzone Server Connect I created a Validate Data after my database connection and before the Database Insert per video. However, after setting up and I click on validate options again, in the HTML5 Form Validator window that pops up, the expression field next to the name is blank. I double click on it and Dreamweavers file indicator windows pop up before it allows me to click on the dynamic button. I click on it, expand $_POST, and select my form field named "modelYear". In Field Properties I have "modelYear" listed next to Linked Field, validation rule is Does not exist in Database. Connection, table, column, message are filled it. When i enter a year that already exists, the message does not appear below as shown in video. If I enter a year that does not exist, the form gets reset and using phpmyadmin, i see the data added to the table.
Thank you in advance for your assistance.
Charles
Replies
Replied 07 Aug 2017 06:52:58
07 Aug 2017 06:52:58 Teodor Kuduschiev replied:
Hi Charles,
Could you please send us a link to your page, where we can check this?
Could you please send us a link to your page, where we can check this?
Replied 08 Aug 2017 03:38:28
08 Aug 2017 03:38:28 Charles cruise replied:
Replied 08 Aug 2017 06:48:50
08 Aug 2017 06:48:50 Teodor Kuduschiev replied:
Hi Charles,
I see an internal server error (500) response, when i try to insert something. Please enable the debug option in Server Connect settings.
I see an internal server error (500) response, when i try to insert something. Please enable the debug option in Server Connect settings.
Replied 09 Aug 2017 03:23:29
09 Aug 2017 03:23:29 Charles cruise replied:
The only debug option i see is located in the connection options for the database connection step for the action file i have named "insert". There is a check box at the bottom of the window for debug. I clicked on it and hit okay. After saving, if I click on the connection options box again, that check box isn't there any more.
Am I in the right area to enable the debug option in server connect settings?
Thank you in advance for your assistance.
Charles
Am I in the right area to enable the debug option in server connect settings?
Thank you in advance for your assistance.
Charles
Replied 09 Aug 2017 07:25:30
09 Aug 2017 07:25:30 Teodor Kuduschiev replied:
Hi Charles,
Actually here is the debug option:
Actually here is the debug option:
Replied 09 Aug 2017 12:15:47
09 Aug 2017 12:15:47 Charles cruise replied:
Thank you, I have it turned on now.
Charles
Charles
Replied 09 Aug 2017 12:19:26
09 Aug 2017 12:19:26 Teodor Kuduschiev replied:
I see now the problem -
"SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1993' for key 'modelYear'"
That is why the error does not appear on your page. It is your database table column setup in a way that it does not allow duplicate entries (i think itis a key column), so that the validation cannot kick in, as the server errors before that
"SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1993' for key 'modelYear'"
That is why the error does not appear on your page. It is your database table column setup in a way that it does not allow duplicate entries (i think itis a key column), so that the validation cannot kick in, as the server errors before that
Replied 09 Aug 2017 12:25:46
09 Aug 2017 12:25:46 Charles cruise replied:
Yes, i believe that table is setup to not allow duplicates. Is this an old habit I learned years ago that I should get rid of?
Thanks,
Charles
Thanks,
Charles
Replied 09 Aug 2017 12:32:16
09 Aug 2017 12:32:16 Teodor Kuduschiev replied:
If your columns allows duplicates, then the validation message will appear As the server won't return an "duplicate key" error.
Replied 09 Aug 2017 12:37:34
09 Aug 2017 12:37:34 Charles cruise replied:
Is there another way using the extensions available to get a message to display they are attempting to enter a duplicate entry when the columns doesn't allow duplicates?
Thanks.
Thanks.
Replied 09 Aug 2017 12:52:37
09 Aug 2017 12:52:37 Teodor Kuduschiev replied:
No, as the extension cannot check this, when your server returns an error.
Replied 09 Aug 2017 12:56:20
09 Aug 2017 12:56:20 Charles cruise replied:
Okay, thanks for the help. With the server debug on, is there a way for me to see those error messages? If so, how?
Thanks.
Thanks.
Replied 09 Aug 2017 13:23:52
09 Aug 2017 13:23:52 Teodor Kuduschiev replied:
Yes, please take a look at this: www.dmxzone.com/go/32354/debugging-problems-in-dmxzone-server-connect/
Replied 12 Aug 2017 21:52:22
12 Aug 2017 21:52:22 Charles cruise replied:
Thank you for your assistance.