Maybe I’m just not seeing it. Is there a way to filter TARGETS in the list view by converted/unconverted?
In LEADS there’s a field for “status” and you can filter by In Process, Converted, New, etc.
There doesn’t seem to be this functionality in TARGETS. I guess I could create a custom field, but TARGETS already keep track of what is converted/not it’s just there’s no obvious way of adding it to the filter. Am I missing something obvious?
pgr
16 October 2020 18:25
#2
Hi!
I don’t see a converted field in the database for Targets…
It must be checking if it is already converted using some other mechanism. Possibly it’s checking if there is a relationship to a Lead?
@pstevens
Module Prospects has the field ‘lead_id’. It has id of Lead after converting.
I found one interesting, standard and working way.
copy files:
modules/Prospects/metadata/SearchFields.php --> custom/modules/Prospects/metadata/SearchFields.php
modules/Prospects/metadata/searchdefs.php --> custom/modules/Prospects/metadata/searchdefs.php
Add code to files
custom/modules/Prospects/metadata/SearchFields.php:
...
$searchFields['Prospects'] =
array(
// add code start
'open_only_lead_conv' => array(
'query_type'=>'format',
'operator' => 'subquery',
'subquery' => "SELECT prospects.id FROM prospects
WHERE prospects.deleted = 0
and prospects.lead_id IS NOT NULL",
'db_field'=>array('id')
),
// add code finish
...
custom/modules/Prospects/metadata/searchdefs.php
...
'layout' => array(
'basic_search' => array(
array('name' => 'search_name', 'label' => 'LBL_NAME', 'type' => 'name'),
array('name' => 'current_user_only', 'label' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'),
// add line
array('name' => 'open_only_lead_conv','label' => 'LBL_CONVERTED_LEAD','type' => 'bool',),
...
1 Like
Cool! I’m going to try that. Thanks!