Answers.Body: <p>The 'File on Case' setting in Form Builder is used to assign an Activity to a Case (where these are both created by the form), for e.g. in Activity 1 tab you set File on Case = Case 1.</p>
  <p>However, for this to work properly when the form is completed by an anonymous user, you must set Case Creator = Individual 1 (if Individual 1 is the anonymous user completing the form).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-09-10T14:34:01.400Z
Answers.LastActivityDate: 2024-09-10T14:34:01.400Z
Answers.UserDisplayName: Tom Rosenbloom
Body: <p>This is the desired behaviour:</p>
  <ol>
  <li>anonymous user completes volunteer application form</li>
  <li>the form creates:
  <ul>
  <li>a new contact record for the user</li>
  <li>a new case of type Volunteering for that user</li>
  <li>an activity, say  'Volunteer Form Submitted', on that case</li>
  </ul>
  </li>
  </ol>
  <p>I've been able to create a case and a separate activity, but not an activity that belongs to the case.</p>
  <p>NB this has to work for anonymous users.</p>
  <p>Possibly connected - what is this setting for (below)?</p>
  <p><a href="https://i.sstatic.net/pBe4Q6Cf.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/pBe4Q6Cf.png" alt="enter image description here" /></a></p>
  <p>Edit: screenshot showing issue with Cases tab in contact summary:</p>
  <p><a href="https://i.sstatic.net/kErp2hNb.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/kErp2hNb.png" alt="enter image description here" /></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-08-29T17:27:16.083Z
Comments.Text: Your screenshot looks correct, and the activity ought to be filed on the case. This may be a bug. What version of Civi are you using?
Comments.UserDisplayName: Coleman
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-08-30T10:10:26.970Z
Comments.Text: Hi @Coleman, it's version 5.70.2. As you've confirmed that 'File on Case' does what I thought, I'm going to run another (simplified) test - the case type in question here has scheduled activities, which I figure could be causing a conflict.
Comments.UserDisplayName: Tom Rosenbloom
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-08-30T10:56:05.073Z
Comments.Text: @coleman same result with a simplified test. Note also the issue with the contact summary (screenshot added to original query). The cases tab shows Cases 1, but in the tab 'There are no case records for this contact.'
Comments.UserDisplayName: Tom Rosenbloom
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-08-30T11:13:48.237Z
Comments.Text: I created an issue for this: https://lab.civicrm.org/dev/core/-/issues/5425
Comments.UserDisplayName: Tom Rosenbloom
Tags: <civicase><formbuilder>
Title: How to make a FormBuilder form that creates (1) Case (2) an Activity attached to that case, when completed by an anonymous user?
ThreadText: # How to make a FormBuilder form that creates (1) Case (2) an Activity attached to that case, when completed by an anonymous user?
  
  (Asked by: username_0 on 2024-08-29)
  
  This is the desired behaviour:
  
  1. anonymous user completes volunteer application form
  2. the form creates:
     * a new contact record for the user
     * a new case of type Volunteering for that user
     * an activity, say 'Volunteer Form Submitted', on that case
  
  I've been able to create a case and a separate activity, but not an activity that belongs to the case.
  
  NB this has to work for anonymous users.
  
  Possibly connected - what is this setting for (below)?
  
  [![enter image description here](https://i.sstatic.net/pBe4Q6Cf.png)](https://i.sstatic.net/pBe4Q6Cf.png)
  
  Edit: screenshot showing issue with Cases tab in contact summary:
  
  [![enter image description here](https://i.sstatic.net/kErp2hNb.png)](https://i.sstatic.net/kErp2hNb.png)
  
  **Tags:** civicase, formbuilder
  
  > **Comments:**
  > **username_1**: Your screenshot looks correct, and the activity ought to be filed on the case. This may be a bug. What version of Civi are you using?  
  > **username_0**: Hi @username_1, it's version 5.70.2. As you've confirmed that 'File on Case' does what I thought, I'm going to run another (simplified) test - the case type in question here has scheduled activities, which I figure could be causing a conflict.  
  > **username_0**: @username_1 same result with a simplified test. Note also the issue with the contact summary (screenshot added to original query). The cases tab shows Cases 1, but in the tab 'There are no case records for this contact.'  
  > **username_0**: I created an issue for this: https://lab.civicrm.org/dev/core/-/issues/5425  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2024-09-10. Score: 1
  
  The 'File on Case' setting in Form Builder is used to assign an Activity to a Case (where these are both created by the form), for e.g. in Activity 1 tab you set File on Case = Case 1.
  
  However, for this to work properly when the form is completed by an anonymous user, you must set Case Creator = Individual 1 (if Individual 1 is the anonymous user completing the form).
  
  
  ---
  
  