1

I'm on Drupal 7 and CiviCRM 4.6.10. In Views, I am trying to show all the activities and their custom fields (multiple choice options). However, I'm not able to get any results, the custom field was added but the field is blank. Is this an expected behavior?

2

Nope. That is not expected behavior.

If you have two separate databases, one for Drupal and one for Civi, then you'll need to add the tables to the settings.php file. Until you add them, Views will show the fields as available but will display an error that the table could not be found.

Every time you add a new custom set of fields, you'll need to go to Admnister/System Settings/CMS Database Integration, copy the code there and paste it into your settings.php file.

  • 1
    You may also need to clear Drupal caches as sometimes the fields still don't show immediately I find. Also I have started spotting that a number of fields are being displayed in the Views field list twice, once with a comment about 'help not being available' (or some such) and another with the description. be sure to use the latter. – petednz - fuzion Nov 8 '15 at 19:29
  • Hmmm. I haven't seen that. Good info Pete. I'll keep my eyes out for it. – pmoz Nov 8 '15 at 21:57
  • Thank you -- it looks like Drupal and Civi are in the same database. I cleared the cache and the fields are showing now. However, for the multi-select field, the value is showing numbers (correct), but the label is also showing values (incorrect). The label should be showing the label of the field. Any thoughts? – Kristine Nov 9 '15 at 4:33
  • I tested a multi-select field by creating a new view, selecting a multi-select field and it listed the labels separated by a comma. Check how the options are defined in the custom field set. Label (human readable value) should be in the label field while value and order should be a number. So for my label, I had Diabetes/Sugar in the label field, 1 for both value and order. – pmoz Nov 9 '15 at 11:31
  • 1
    I figured it out. It appears that when a multi-field is being shared with another fieldset ("Reuse an existing set") the labels don't show, values only. I created a new set of options with my 15 entries and now Views is displaying the labels. – Kristine Nov 10 '15 at 0:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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