Set checkbox to true by default

finifini Posts: 14Member
I want on a page that a checkbox should be checked by default. I tried on page's OnInit() trigger:
"Prices on Invoice" := TRUE;
but the checkbox is still not checked

Answers

  • vaprogvaprog Posts: 939Member
    Hi fini,

    in the general case you should use the InitValue property on the table field.

    In other cases yo might want to add code in one or more of the following triggers:
    Table.OnInsert
    Page.OnInsert
    Page.OnNewRecord

    The InitValue property and the OnNewRecord have the advantage, that the field is initialized properly from the start, presented to the user this way, and the user can choose to change it even before the record is inserted.
    The OnInsert trigger method should only be used for fields that are not user editable, but calculated in some way.
Sign In or Register to comment.