How to show only attended events in events subpanel


I want to display only those events in the event subpanel of the contact module which have marked attended.

can it only show the events that were marked ATTENDED?

Thanks in advance

Look at as example:

  1. modules/Activities/metadata/subpaneldefs.php and variable ‘where’ in array ‘Meetings’ or ‘Tasks’ . It’s for events.
  2. modules/Accounts/metadata/subpanels/default.php variable ‘where’ . It’s for another modules.

Hi @p.konetskiy, Thanks for your reply :slight_smile:

I want to show only those records in events sub panel of contacts module which have attended status.

Suppose contact ‘A’ got the invitation for 2 events X an Y but he attended only X, So now when we open ‘A’ record in its event subpanel, it should show only X.

How we can do this?

I tested decision:
You can edit the files:

  1. modules/Meetings/metadata/subpanels/ForActivities.php for Meetings.
  2. modules/Calls/metadata/subpanels/ForActivities.php for Calls.

and change from:

'where' => "(meetings.status !='Held' AND meetings.status !='Not Held')",


'where' => "(meetings.status !='Held' AND meetings.status !='Not Held' AND meetings_contacts.accept_status='Accepted')",

Hi @p.konetskiy,

Thank you so much for your reply :).

Actually my requirement is related to this .

SuiteCRM send your Contact email with invitation for the meeting. If your Contact click “Accepted” than the field ‘accept_status’ will be changed.


I am getting MySQL error 1054: Unknown column ‘meetings_contacts.accept_status’ in ‘where clause’ error if i add -
‘where’ => “(meetings.status !=‘Held’ AND meetings.status !=‘Not Held’ AND meetings_contacts.accept_status=‘Accepted’)”,

It’s very strange because the table “meetings_contacts” and the column “accept_status” were included to base system since SugarCRM CE. It’s the link between modules Meeting and Contact. You can show file metadata/meetings_contactsMetaData.php .
If you can check tables in data base.

contact module’s (Event subpanel) -

Event module -

this is still same

@p.konetskiy Thanks a lot for helping me

I wrote about Meeting as an example.
For module FP_events code here:
Edit file: modules/Contacts/metadata/subpanels/FP_events_subpanel_fp_events_contacts.php
and after

global $app_strings;

add line:


It’s work. I tested.

Without code:

With code:


The query is working on delegates subpanel but the problem is that it is not allowing me to select delegates from select delegates option.

I want to apply this query for the event subpanel of the contacts module.

the activity status remains none always.

The field ‘activity_status_type’ whose label ‘Activity Status’ present in SuiteCRM but don’t use. You can add logic for this field manually.

Hello @p.konetskiy,

How we can add invite_status field in event subpanel of contact module to show only those events which have attended status.

You can use logichook: process_record . Look at information here:
When the record is read you can analyse Delegates data of Events and write correct status.

Hi @p.konetskiy,

If i am using process record logic hook, my query is not executing from this logic hook for events.

Can you check at you end.


Hi, @jyotip
Can you show your code?



Initialize hook_array before adding to it

$hook_array['process_record'] = Array();
$hook_array['process_record'][] =  .... etc

Hi @pgr,

I initialized it, but still it’s same

Check your php_errors.log for any errors. The path for it is defined in your php.ini.

And instead of outputting things onto the screen to check if the hook is running, try writing to the logs instead. Hooks are not made to output any views, you never know where your output is going, it won’t necessarily be visible, and it might even break the screen.