0

I have a Boolean button where I want a user to only click or choose one. I am using Microsoft Dynamic Nav 2015.

enter image description here

Guido Preite
  • 14,905
  • 4
  • 36
  • 65
Annie
  • 33
  • 11

1 Answers1

1

In the OnValidate() trigger on the page field, create a local variable of the record and do something like this; it will set all other votes to FALSE when you set one to TRUE:

IF Vote = TRUE THEN BEGIN
    theRec.SETRANGE(Vote, TRUE);
    IF NOT theRec.ISEMPTY THEN
        IF theRec.FINDSET THEN
            REPEAT
                theRec.VALIDATE(Vote, FALSE);
                theRec.MODIFY(TRUE);
            UNTIL theRec.NEXT = 0;
END;
Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77