Hi @maretval
Yes, we are using Kreporter a full version.
Query
SELECT MIN(chytfbdznnc.id) as sugarRecordId, ‘Accounts’ as “sugarRecordModule” , aebpthxehmp.id as “aebpthxehmpid”, ‘root:Accounts::relate:Accounts:client_partner_c’ as “aebpthxehmppath”, jbszyrknxpa.id as “jbszyrknxpaid”, ‘root:Accounts:Accounts:assigned_user_link’ as “jbszyrknxpapath”, mqjafbmqryr.id as “mqjafbmqryrid”, ‘root:Accounts:Accounts:opportunities’ as “mqjafbmqryrpath”, chytfbdznnc.id as “chytfbdznncid”, ‘root:Accounts’ as “chytfbdznncpath”, MIN(hpfykjaryxe.office_c) as “k12c9c53ed4d039a3c795eb459bdf”, (LTRIM(RTRIM(CONCAT(IFNULL(aebpthxehmp.first_name,“”)," “,IFNULL(aebpthxehmp.last_name,”“))))) as “kb35d0708b84badd9e576870dd176”, (LTRIM(RTRIM(CONCAT(IFNULL(jbszyrknxpa.first_name,”“),” “,IFNULL(jbszyrknxpa.last_name,”"))))) as “k7405f674b7aa440a4b15a12ba5c4”, hpfykjaryxe.client_id_c as “k14c6da5a90b61eb35cac7d1d1d08”, MIN(chytfbdznnc.name) as “k085f8f1af6b61565a41ca57f2140”, MIN(chytfbdznnc.industry) as “k6d2bd5137a5c314d1c42d8110222”, SUM(erxabmpzjgb.estimated_revenue_c) as “k3203962249783675d86a60909455”, mqjafbmqryr.currency_id as ‘k3203962249783675d86a60909455_curid’, MIN(erxabmpzjgb.service_item_c) as “ke0826fc8cd51eed051f8d1467afc”, MIN(hpfykjaryxe.referred_by_c) as “kc3baadd4468b4d0f8aab86b2342c”
FROM accounts chytfbdznnc
LEFT JOIN accounts_cstm as hpfykjaryxe ON chytfbdznnc.id = hpfykjaryxe.id_c
LEFT JOIN users AS aebpthxehmp ON aebpthxehmp.id=hpfykjaryxe.user_id1_c
LEFT JOIN users_cstm as bqsxesmmrmp ON aebpthxehmp.id = bqsxesmmrmp.id_c
LEFT JOIN users jbszyrknxpa ON chytfbdznnc.assigned_user_id=jbszyrknxpa.id AND jbszyrknxpa.deleted=0
LEFT JOIN users_cstm as gzdryejcrsn ON jbszyrknxpa.id = gzdryejcrsn.id_c
INNER JOIN accounts_opportunities terkgrqwkbt ON chytfbdznnc.id=terkgrqwkbt.account_id AND terkgrqwkbt.deleted=0
INNER JOIN opportunities mqjafbmqryr ON mqjafbmqryr.id=terkgrqwkbt.opportunity_id AND mqjafbmqryr.deleted=0
LEFT JOIN opportunities_cstm as erxabmpzjgb ON mqjafbmqryr.id = erxabmpzjgb.id_c
WHERE chytfbdznnc.deleted = ‘0’
GROUP BY hpfykjaryxe.client_id_c
ORDER BY MIN(hpfykjaryxe.office_c) ASC
“Office” is the Account of the custom “DropDown” field. It is DB data type is varchar.
DropDown Option List
‘7’ => ‘Alliance’,
‘43’ => ‘Cannabis’,
‘42’ => ‘CAAS’,
‘35’ => ‘Cherry Hill’,
‘2’ => ‘Finanace’,
‘10’ => ‘NAPLES’,
‘39’ => ‘WEST PALM BEACH’
Report of Graph sorting on DB value of varchar 10(NAPPLES), 35(Cherry Hill), 39(West Palm Beach), 42(CAAS), 43(Cannabis), 7(Alliance)
Data is displayed on DropDown Display Value
I want the toggle option to search by DropDown display value or search by DB value.