Menu

#35 FLAG_DOMINANT should have 1 Y

open
nobody
None
5
2008-04-07
2008-04-07
No

Not really sure if this is a bug or a rule but the FLAG_DOMINANT automation should check for having one of the fields set to Y and if you try to save and there is no row set to Y it should throw an error. That or disable the change of a value when the value == Y this can be done with a onChange event in the select box that resets it to the old value/selectedIndex.

Discussion

  • Kenneth Downs

    Kenneth Downs - 2008-04-09

    Logged In: YES
    user_id=1711200
    Originator: NO

    I think first we have to ask the question, is it valid for there to be no row with the dominant flag set? We should discuss this on the mailing list and work out an answer, then open a feature request. Don, if you agree please close this bug report and let's move it over to the mailing list.

     
  • Donald Organ

    Donald Organ - 2008-04-09

    Logged In: YES
    user_id=1268217
    Originator: YES

    OK so then maybe we should add an option for this automation_id so maybe an auto_option property for the column and the value of this would be REQUIRE_DOM.

    I am going to move this over to feature requests.

     
  • Kenneth Downs

    Kenneth Downs - 2008-04-18

    Logged In: YES
    user_id=1711200
    Originator: NO

    I think the changes would be like so:

    1) On an insert, if no rows are DOMINANT, the row itself is forced to be DOMINANT=Y. This catches the case of the first row being inserted.

    2) On an update, if the DOMINANT is set to N, and no row is Y, throw an error and rollback. This prevents the case of the DOMINANT row being turned off.