Alpha Video Training
Results 1 to 6 of 6

Thread: Help needed - validation errors

  1. #1
    Member
    Real Name
    Greg Carmody
    Join Date
    Apr 2017
    Location
    Sydney Australia
    Posts
    215

    Default Help needed - validation errors

    I'm getting this error popup when I click on a row in a list: "Cannot save because there are validation errors".

    All I'm doing is clicking on the row, I'm not trying to save it. I have some fields in the record with validation rules - simple rules like minimum length and not blank. But I can create a new record and save it without any problems. The problem happens when I then try to click on it. No errors are showing in the browser console. It happens both in the browser and on Android with phonegap build.validation errors.PNG

    Help needed urgently. I have an angry customer! Its build 6012 of AA.

    Greg

  2. #2
    Member
    Real Name
    Greg Carmody
    Join Date
    Apr 2017
    Location
    Sydney Australia
    Posts
    215

    Default Re: Help needed - validation errors

    forgot to include the code in the click event....here it is, nothing here likely to cause this problem from what I can see...….

    {dialog.Object}.setDisabled('BUTTON_72', true);
    {dialog.Object}.setDisabled('BUTTON_78', false);

    var lObj = {dialog.Object}.getControl('SITE_LIST');
    lObj.allowNullSelection = true;
    setTimeout(function() {lObj.deselectAll(); }, 400);
    {dialog.object}._listRemoveAllRows('LOCATION_LIST');
    this.allowNullSelection = false;

  3. #3
    Member
    Real Name
    Greg Carmody
    Join Date
    Apr 2017
    Location
    Sydney Australia
    Posts
    215

    Default Re: Help needed - validation errors

    OK, found the offending code. It was in the onListDraw event:

    {dialog.Object}.setValue('date_assigned',get_Date(0));

    I'm sure this was working at some stage. Does anyone know if get_Date is valid in AA? If so, what is the correct syntax?

    Greg
    PS> still don't know why this is causing an error message about validation errors????

  4. #4
    Member
    Real Name
    Greg Carmody
    Join Date
    Apr 2017
    Location
    Sydney Australia
    Posts
    215

    Default Re: Help needed - validation errors

    OK, further info on the problem....seems the list doesn't like doing a set value on one of the fields of the list's detail view from a list event. This code was previously working so can only assume its a problem with the 6012 build.

    I replaced the setvalue with a reference to data[i].date_assigned. That seems to work ok.

    Greg
    Last edited by gcarm@bigpond.com; 10-10-2019 at 01:02 AM.

  5. #5
    Member
    Real Name
    Greg Carmody
    Join Date
    Apr 2017
    Location
    Sydney Australia
    Posts
    215

    Default Re: Help needed - validation errors

    The plot thickens.....
    The above did not fully fix the problem. It came back after I did another rebuild. I'm beginning to suspect this is another bug in build 6012.
    What I did discover is that if I turn off the property "Auto commit detail view on row select" in the list detail view properties, the message is replaced with "You must first save or cancel your changes to the list's detail view".

    So it seems AA thinks I've made changes to the lists detail view even though I have not edited it or added any new record, or programmatically changed any of the fields in the list. In fact it is happening when I start up the app and then click on a row in the list without doing anything else.

    I can work around it by adding the following to the click event for the button that displays the panel containing the list:
    var listObj = {dialog.object}.getControl('JOB_LIST');
    listObj.resetForm({prompt: false});

    It only happens once when the app is first initialised. It sounds like a bug to me since this didn't happen until I upgraded to build 6012.

    Greg

  6. #6
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,627

    Default Re: Help needed - validation errors

    I'd report it with a test case.
    Insanity: doing the same thing over and over again and expecting different results.
    Albert Einstein, (attributed)
    US (German-born) physicist (1879 - 1955)

Similar Threads

  1. validation errors
    By njguy in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 03-20-2017, 05:17 PM
  2. Is there any way to dictate where validation errors appear within a ux component?
    By coleresources in forum Mobile & Browser Applications
    Replies: 4
    Last Post: 07-18-2013, 12:35 PM
  3. Highlight Tabs Containing Field Validation Errors
    By floyd in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 12-08-2010, 11:06 AM
  4. Help with Grid Validation Template for Reporting Errors
    By rjonas in forum Web Application Server v7
    Replies: 0
    Last Post: 10-04-2006, 01:07 AM
  5. customize 'validation errors'
    By Sieward in forum Web Application Server v7
    Replies: 6
    Last Post: 02-18-2006, 09:46 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •