Hi,
I need to apply a custom format to a lookup field’s display value.
I have a lookup field, let’s call it my_lookup_field, which uses another table for its display values. The display field is a string that represents a specific date. I need to convert this date string into a different format (e.g., from YYYY-MM-DD to DD-MM-YYYY).
I have already tried the following methods:
- Using a Custom Field with an empty expression and then assigning the value in
Row_Rendered. This method works for grid pages and view pages, but does not affect the options in the lookup dropdown list itself. - Calling a custom PHP function directly in
Lookup_Selecting, such asconvertToCustomFormat(date_field). This results in anSQL syntax error, as PHPMaker expects a valid SQL expression, not a PHP function.
It seems that the values displayed in the lookup dropdown are handled separately from the main grid view.
Is there a server-side method (without using client-side JavaScript) to manipulate the lookup options’ display values before they are sent to the browser? Or, is there a different approach I should be using?
Any guidance on how to achieve this would be greatly appreciated. Thank you.