Support (offered by community volunteers) > Using Profiles

using civiCRM custom fields in Drupal views

(1/2) > >>

ShirleyB:
When I add civiCRM custom fields to a Drupal view, the view returns no data.

I'm trying to construct a view showing a directory of current members of a particular type. I created a drupal 'user' type view and added fields from drupal, including this member role (I have drupal/civi sync modules installed). The view shows the relevant users/members.

Then I add fields of the type 'CiviCRM Custom: premium member profile' (my profile with the custom fields - set to search and public). As soon as any of these fields are added to the view the list of relevant users/members disappears and my view table is completely empty. I've also tried adding standard/non-custom civiCRM fields (e.g. contact fields) to my view, with the same result i.e. no results in the table. I've tried clearing all the caches and it makes no difference.

Sometimes I get the error message "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'telework_devel_drupal.civicrm_uf_match' doesn't exist"  Am I right in thinking that my problem is something to do with the msql query being unable to pick up the civiCRM fields because I need to do more with the drupal/civi sync modules? And if so what? At present I have associations between the drupal roles and the civiCRM membership types.

I'm a newbie at this and am stumped as to what to try next - any suggestions gratefully received :-) Thanks, Shirley

Kurund Jalmi:
Have you update drupal's settings.php with proper table aliases ? Check http://drupal.demo.civicrm.org/civicrm/admin/setting/uf?reset=1

Hth
Kurund

ShirleyB:
Hi, I'm sorry I don't understand what that means. However, I've looked at the drupal settings.php and the civicrm.settings.php and they both seem to have the right database information in them. the demo site link seems simply to be a list of tables - they don't appear in either of my settings.php files so where would I add them?

AND connections must be being made between the databases because in my view listing just the drupal fields I can click on the username and it takes me to the profile showing my custom fields. It's only when I try to incorporate custom fields from civiCRM (which appear on the drop down list of types of fields to add) that I get no data results.

Shirley

Kurund Jalmi:

--- Quote --- the demo site link seems simply to be a list of tables - they don't appear in either of my settings.php files so where would I add them?
--- End quote ---

You need to add array to your settings.php. Check http://wiki.civicrm.org/confluence/display/CRMDOC40/Views3+Integration

Kurund

ShirleyB:
Thanks, I'll give that a try

shirley

Navigation

[0] Message Index

[#] Next page

Go to full version