Answers.Body: <p>there may be a gotcha but if you start a View based on webform submissions then you can join (via Relationships) the Drupal user, then you can get to the Contact, and in theory you would then be able to get to the Case.</p>
  <p>my quick example didn't work but maybe doing so in reverse</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-24T17:57:20.190Z
Answers.Text: Thanks Peter - This comment will answer Craig's comment below as well. The issue is that as I mentioned, there is no Drupal User.  When someone applies for a role at the charity, we anonymise the details in various ways.  We create a Case from an anonymous Drupal user submitting a Webform.  One of the things I wanted to display was an exact time of submission, which I can get from the Webform submission, but the Case Created date has no time.  We could force people to register as a Drupal User, but it seems wasteful given that there is ultimately a link between the submission and the case.
Answers.UserDisplayName: ChumKui
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-24T23:41:56.163Z
Answers.Text: sorry missed that point. surprised there is nothing from Case that gives you exact time but if so why not add a different Activity on to the webform, as well as the Case, and that presumably would get the exact time
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-27T08:00:18.470Z
Answers.Text: Yes, either an Activity or a custom field is the probably the way forward.  If you do know of a (Views accessible) Case field, let me know! Thanks for the input as always.
Answers.UserDisplayName: ChumKui
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-23T20:10:16.503Z
Answers.LastActivityDate: 2022-06-23T20:10:16.503Z
Answers.UserDisplayName: petednz - fuzion
Answers.Body: <p>The quickest answer I can give is, no.</p>
  <p>I can't think of a way of combining civi information and webform submission details.</p>
  <p>What you can do is the use relationships in Civi to start with case data, and then bring into the view other data in civicrm linked to the case.
  The case contact for example
  And also data about any case activities</p>
  <p>What data from the webform submission are you wanting to show alongside the Civi Contact/ Case Data?</p>
  <p>Are you able to give an example?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-23T12:03:10.917Z
Answers.LastActivityDate: 2022-06-23T13:09:50.177Z
Answers.LastEditDate: 2022-06-23T13:09:50.177Z
Answers.UserDisplayName: Craig Almond
Body: <p>We use Drupal (7) Webforms integrated with CiviCRM for various use cases, particularly recruitment forms.</p>
  <p>I can create a Drupal View of <em>either</em> Webform Submissions OR CiviCRM Cases, but I cannot combine the two as there is no obvious way of relating a Webform submission to the CiviCRM contact that submitted it unless they are a Drupal User  - the vast majority of submissions are not for us.</p>
  <p>I can see a Drupal database table called <code>webform_civicrm_submissions</code> but this is not your usual SQL table that can be accessed via Views it seems.</p>
  <p>Any ideas?!</p>
  
Tags: <webform-civicrm><drupal-views>
Title: Is it possbile to use Drupal Views to relate Webform Submissions and CiviCRM Contacts and Cases?
ThreadText: # Is it possbile to use Drupal Views to relate Webform Submissions and CiviCRM Contacts and Cases?
  
  (Asked by: username_0 on 2022-06-23)
  
  We use Drupal (7) Webforms integrated with CiviCRM for various use cases, particularly recruitment forms.
  
  I can create a Drupal View of *either* Webform Submissions OR CiviCRM Cases, but I cannot combine the two as there is no obvious way of relating a Webform submission to the CiviCRM contact that submitted it unless they are a Drupal User - the vast majority of submissions are not for us.
  
  I can see a Drupal database table called `webform_civicrm_submissions` but this is not your usual SQL table that can be accessed via Views it seems.
  
  Any ideas?!
  
  **Tags:** webform-civicrm, drupal-views
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2022-06-23. Score: 0
  
  there may be a gotcha but if you start a View based on webform submissions then you can join (via Relationships) the Drupal user, then you can get to the Contact, and in theory you would then be able to get to the Case.
  
  my quick example didn't work but maybe doing so in reverse
  
  > **Comments:**
  > **username_0**: Thanks Peter - This comment will answer username_2's comment below as well. The issue is that as I mentioned, there is no Drupal User.  When someone applies for a role at the charity, we anonymise the details in various ways.  We create a Case from an anonymous Drupal user submitting a Webform.  One of the things I wanted to display was an exact time of submission, which I can get from the Webform submission, but the Case Created date has no time.  We could force people to register as a Drupal User, but it seems wasteful given that there is ultimately a link between the submission and the case.  
  > **username_1**: sorry missed that point. surprised there is nothing from Case that gives you exact time but if so why not add a different Activity on to the webform, as well as the Case, and that presumably would get the exact time  
  > **username_0**: Yes, either an Activity or a custom field is the probably the way forward.  If you do know of a (Views accessible) Case field, let me know! Thanks for the input as always.  
  
  ---
  
  ### Answer by username_2 on 2022-06-23. Score: 0
  
  The quickest answer I can give is, no.
  
  I can't think of a way of combining civi information and webform submission details.
  
  What you can do is the use relationships in Civi to start with case data, and then bring into the view other data in civicrm linked to the case.
  The case contact for example
  And also data about any case activities
  
  What data from the webform submission are you wanting to show alongside the Civi Contact/ Case Data?
  
  Are you able to give an example?
  
  
  ---
  
  