CodeCharge Studio
Modify a Label Field on the Task Maintenance Page
Now let's make one necessary modification on the Task Maintenance page where you might've noticed that the Label field Assigned By doesn't display the employee name, but the ID, as shown below. This is because the tasks table contains only the user ID, while the employees table contains the actual user names.
There are several potential methods of dealing with the above issue as explained below:
- Create a Query that contains multiple tables and can be used as the data source for the record form, just like you did with the grid on the Task List page. Unfortunately, queries that contain multiple tables may not be updateable by their nature, and thus your whole record form may stop working. In other words, if you specified that you want to use a query containing tasks and employees table in your record form, then if you assigned a task to someone else, the program wouldn't know if you wanted to update the tasks table with the new employee_id, or if you wanted to update the employees table and change employee's name.
Thus if you used multiple tables as a data source for the record form, you would also need to specify Custom Insert, Custom Update and Custom Delete operations in record form's properties, to specify which database fields should be updated with corresponding values entered on the page. This approach looks like too much effort just for displaying one additional value on the page.
- Use an Event Procedure to insert custom code where you can programmatically output the desired value. This method is very flexible, as it allows you to extend the generated code by adding your own. The next step describes this method in detail.

Next: Use the Before Show Event to Alter a Label's Value
On-line, printable versions and updates