AOR report for Survey / Survey responses / Contacts

Hello All

Looking through the forum I can’t find a post that covers my current issue

I now have surveys running in SuiteCRM via email campaigns and AOW workflows

We are getting responses and I need to write a report on the our staff responses for each team member

When creating the AOR report based on the Contact module the Survey Responses module is not available in the module tree

I have got as far as creating the report based on Survey Responses and using the contact field available in that field list

The report looks like
image

However when I try to add any fields from the Contact module itself the report fails and brings back 0 results

Any help appreciated

Hey,

Are you still having issues with this?


I’ve had a look, and it seems as though the DB Query builds like so:

"SELECT `surveyresponses`.name AS 'Name0', `surveyresponses`.date_entered AS 'Date_Created1',
 `surveyresponses`.contact_id AS 'Contact2', `surveyresponses:contact`.assigned_user_id AS 'Assigned_to3',
 `surveyresponses`.id AS 'surveyresponses_id' FROM `surveyresponses`  WHERE surveyresponses.deleted = 0 "

With the issue being:

 `surveyresponses:contact`.assigned_user_id AS 'Assigned_to3',

As this query is looking for “surveyreponses:contact.assigned_user_id”, and it is not a valid field, the query fails and returns an empty result set

Whereas, typically, the Query will build using various JOIN statements, if the report is pulling data from multiple modules.

I would think that it is due to the unique one-sided relationship that Contacts<->Survey Responses has
(Where you can only see Contacts from the Survey Response record, and NOT vice-versa)


Unfortunately, I’m not too sure how to resolve this.

However, a potential workaround may be to add a new custom M2M relationship, via Studio, between Contacts<->Survey Responses

I’m not sure how well this would work with the OOTB Survey Functionality, but this should work as expected when used in Reports
(As the relationship fully exists on both sides)


For now, I’d recommend raising an issue via the Github Repo, if one doesn’t already exist

Hi @John
Thank you for the response :slight_smile:

Yes this issue is still ongoing

We tried the M2M relationship, via Studio, between Contacts<->Survey Responses but no success with the auto process from surveys

Thanks again