Use codes for Checkbox and static radio buttons/droplists

In the “Before record added” event for both the Add page and Edit Page, use the following code to convert the value in the database to what is expected on the page.

values["ExcludeFromAccumulator"] = values["ExcludeFromAccumulator"] == "Y" ? 1 : 0;

Then in the “Before record added” event of the Add page and the “Before record updated” event of the Edit page, use the following code to convert what was entered/selected on the page to what should be stored in the database.

values["ExcludeFromAccumulator"] = values["ExcludeFromAccumulator"] == 1 ? "Y" : "N";