2

Is there a way to display custom fields in a Views Calendar (Drupal 7, CiviCRM 4.7.18)? I have custom fields in a table assigned to a certain contact (with the option to add more rows). One of these fields, is a date/time field. I'm trying to display this field in Views Calendar. I tried going to "add view from template" and then choosing the option: "A calendar view of the 'custom_45' field in the 'civicrm_contact' base table." However, I'm getting the error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'civicrm_contact.custom_45' in 'field list'

Weird because I am able to list all these fields in a table fine.

4
  • Hi Kristine - so you can display the civicrm date fields in a views format: table - but you can't get them into a views format calendar - is that right? May 4, 2017 at 18:42
  • Yes, you're right! I'm also trying to figure out if this is a bug in CiviCRM Entity.
    – Kristine
    May 4, 2017 at 20:45
  • Did you update your settings.php with the new custom field?
    – pmoz
    May 25, 2017 at 10:29
  • If you are using CiviCRM Entity, and the version is old, you should upgrade to 2.0-beta8....CiviCRM Entity used to automatically create field handlers for custom fields that didn't work...by your sql there it looks like this may be the case...you should use the "stock" handlers....the custom fields are in separate groups, the name of of the custom field group... Jul 7, 2017 at 15:15

1 Answer 1

1

That error appears when Drupal can't recognise your CiviCRM SQL Tables.

You can find guidance on how to update your settings.php file here: https://wiki.civicrm.org/confluence/display/CRMDOC/Views3+Integration

1
  • Kristine seems to be saying the custom field shows fine in a non-calendar based view, which suggests settings.php wouldn't be the issue.
    – petednz - fuzion
    Jun 7, 2017 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.