Get label of a dropdown in process_record hook

Hi everyone,
i need some troubleshooting about getting the label of a dropdown.
I need in the listview to get some fields colored, so i’ve create a process_record logic_hook with a very simple function:

$bean->ordine_chiuso_c = "<div style='color:#6ab04c'><b>" . $bean->ordine_chiuso_c . "</b></div>";

The issue is that the field comes from a dropdown so, with that code, the list view shows me the key of the record, not the value.
I found the $app_list_strings but it’s not so clear about how it works.
Any help? :unsure: :unsure: :unsure: :unsure:
Thankyou so much :slight_smile:

Try this.

global $app_list_strings;

$app_list_strings['REPLACE_YOUR_LIST_NAME'][$bean->ordine_chiuso_c];
1 Like

Mmm your solution does not work for me but maybe i did something wrong.
Anyway, i found a similar solution:

global $app_list_strings;
$appListLabel_ordine = translate('checkbox_dom','',$bean->ordine_chiuso_c);
$ordine = print_r($appListLabel_ordine,1);

This works fine! :cheer: :cheer:

Cheers!!