How to make sure only one boolean box is ticked at a time

432 views Asked by At

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

1

There are 1 answers

0
Djóni Strømsten On BEST ANSWER

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;