Function BeforeShow<PageName> is executed right before a page is displayed in the browser. Use this event to modify the value of any template variable or to define a new one.
$xt - template engine object. Use $xt->assign($name, $val) to assign a value $val to the variable $name.
$templatefile - name of the template file being displayed.
$values - array of displayed record contents. You can read and write to the array. To access specific field value use $values["FieldName"].
Field names are case-sensitive. If the field name is PlayerId, you should use $values["PlayerId"]. Note that $values["playerid"] or $values["PlayerID"] will not work.
If the field was assigned an alias in the SQL query, then the $values array will get the alias instead of field name from the database. E.g. if you have SQL query select salesrep_id AS Inv_Salesrep ..., you should use $values["Inv_Salesrep"].
$pageObject - an object representing the current page. For more information, see RunnerPage class.
Applies to pages
Recommended sample events