In custom code Before Save Action, I have the following code.
if ('#accepted_date#' < '#reported_date#') {
$error='Accepted date must be greater than reported date'';
nuDisplayError($error);
return;
}
if ('#accepted_date#' == '#reported_date#') {
if ('#accepted_time#' <= '#reported_time#') {
$error='Accepted time must be greater than reported time';
nuDisplayError($error);
return;
}
}
It used to work before but suddenly it gave an error JSON Parse Failed. If I remove nuDisplayError() php function out. It works ok.
Any ideas???
2nd. Question. In addition, in the form I enable Print button. When I click on browse form, it causes an error as shown below.
How to correct this error? I noticed that it generate a table with empty column name. It is a bug or I must put some coding.
===USER==========
globeadmin
===PDO MESSAGE===
SQLSTATE[42000]: Syntax error or access violation: 1166 Incorrect column name ''
===SQL===========
CREATE TABLE __576b5f9202ff6f6__ SELECT problem_id,IFNULL(no,'') AS ``,IFNULL(workorder_no,'') AS ``,IFNULL(DATE_FORMAT(reported_date,"%d-%b-%Y"),'') AS `` FROM problem ORDER BY workorder_no DESC, no ASC
===BACK TRACE====
D:\uwamp3.1\www\pm2\nuapi.php - line 333 (nuRunQuery)
D:\uwamp3.1\www\pm2\nuapi.php - line 244 (nuBuildTable)
D:\uwamp3.1\www\pm2\nuapi.php - line 84 (nuGetBrowseHTML)
Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Before SAVE Action - JSON Parse Failed
-
- Posts: 1
- Joined: Wed Jun 22, 2016 10:54 am
- Location: Thailand
Re: Before SAVE Action - JSON Parse Failed
somnuk,
If you look in the error log(..UwAmp\bin\apache\logs) you may find what the error is (probably a php error).
Steven
If you look in the error log(..UwAmp\bin\apache\logs) you may find what the error is (probably a php error).
Steven
-
- Posts: 28
- Joined: Sat Apr 30, 2016 2:51 am
Re: Before SAVE Action - JSON Parse Failed
this is related to my reported 'Undefined Error', has something to do with the nuBuilderPro's 'eval' call