An example of a Table Level Script showing update of data not submitted from browser

Less than one minute read time.
I have discussed how the Values collection can be used to correct inbound data in the article "Correcting inbound data using Table Level scripts and Values() collection."

This is a further example of how the Values collection can be used. The code sample is from a Table Level script on the company table.

Note:

In the example given here, the field comp_mailrestriction has been removed from the screen companyboxlong and is not submitted from the browser. This example shows both the update of inbound Values and how the Values() collection can be extended to set a value for a field not in the screen.

function UpdateRecord()
{
// Handle update record actions here
var strCompany = Values("comp_name");
Values("comp_name") = strCompany.toUpperCase();
Values("comp_mailrestriction") = 'Y';
}