Hello John,
Thanks, that's more or less the thing I expected to be necessary.
I did a grep for the "concat" funtion, starting from modules/Contact, but I only find this line:
PHP Code:
$select_query .= db_concat($this->table_name,array('first_name','last_name')) . " name, ";
This line is from a function called "address_popup_create_new_list_query". Seems like the wrong place. However, the function embodies this construction:
PHP Code:
//if this is any action that is not the contact address popup, then go to parent function in sugarbean
if(isset($_REQUEST['action']) && $_REQUEST['action'] !== 'ContactAddressPopup'){
return parent::create_new_list_query($order_by, $where, $filter, $params, $show_deleted, $join_type, $return_array, $parentbean, $singleSelect);
}
So my guess'd be I'd have to look at the parent, but there's no mention of the name field being built from the first_name and last_name fields.
Also, how I understand it, the db_contact function can only be used to concat values from a single table; my custom fields are (naturally) in a custom table, as they were studio-made.
Being stubborn, I gave it a few shots like:
PHP Code:
$select_query .= db_concat($this->table_name,array('first_name','middle_name_c','last_name')) . " name, ";
and
PHP Code:
$select_query .= db_concat($this->table_name,array('first_name','contacts_cstm.middle_name_c','last_name')) . " name, ";
However, to no result..
Where would I have to look? I think we're getting somewhere, but still I feel lost
Best, Raj
Bookmarks