Calculated Fields

I have a need for several relatively simple "expressions" in my project, mainly to alter how certain fields are displayed. For example, combining separate fields for First Name, Middle Name, Last Name, Suffix, etc. into a single Full Name field. For the most part, these expressions operate on data in a single table, so I should not need to use join statements for this purpose.
I found the following function, but I'm not sure how to use it:
If I define several of these functions per table, how do I get them to show up in the application? Specifically, I would like them in browse and list views, but potentially also in edit if it is possible for them to be dynamically displayed.
Also, what syntax should be used for conditional-type expressions, operators such as sub-strings, etc. Should this be specified with SQL or PHP code?
Thanks,
Alan
I found the following function, but I'm not sure how to use it:
- Code: Select all
function field__%fieldname%(&$record)
If I define several of these functions per table, how do I get them to show up in the application? Specifically, I would like them in browse and list views, but potentially also in edit if it is possible for them to be dynamically displayed.
Also, what syntax should be used for conditional-type expressions, operators such as sub-strings, etc. Should this be specified with SQL or PHP code?
Thanks,
Alan