Answers.Body: <p><strong>Finally it is working!</strong></p>
  <p>Two where important:</p>
  <ol>
  <li>Disable &quot;Enforce Permissions&quot; for the contact field in the webform config, filled with a default value.
  <a href="https://i.sstatic.net/u1NAf.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/u1NAf.png" alt="&quot;Enforce Permissions&quot; field" /></a></li>
  <li>Look out for the field &quot;Update Existing Case&quot; on the CiviCRM tab. It was set to a case status value, so it would change an existing case.
  <a href="https://i.sstatic.net/KoeMr.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/KoeMr.png" alt="&quot;Update Existing Case&quot; field" /></a></li>
  </ol>
  <p>Many thanks to @AndyClark and @RayWright!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-25T19:51:40.043Z
Answers.Text: Glad you got it sorted!
Answers.UserDisplayName: Andy Clark
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-25T18:46:38.547Z
Answers.LastActivityDate: 2021-02-25T18:46:38.547Z
Answers.UserDisplayName: PatricB
Answers.Body: <p>All the screenshots are super helpful. I think because you have set it to be a static contact but did not tell it which contact, you are seeing an issue. Can you place the ID number of the desired case manager in the Contact (Kontakt) field right below &quot;Set default contact from: Specified Contact&quot;?</p>
  <p>To test that it's working, you might turn on Display Contact Name - just to check that then the form is dispalying the name of the contact you set.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-24T17:36:49.373Z
Answers.Text: I tried to place the ID of the contact into the field for the default value, but I can't save it. I can only search and select a contact from the search result.
  I also turned on "Display Contact Name". If open the webform as anonymouse user, the field for the case manager is empty ("- None Found -"). If open it as logged in user, it is filled with the seleceted contact. (I also disabled "Private" for debugging)
  I disabled then "Enforce Permissions" and now the default selected contact is set in the result, but sadly no more case is added...
Answers.UserDisplayName: PatricB
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-24T22:43:22.610Z
Answers.Text: @PatricB I feel like we can get this going but it might be easier to ask several questions at once. If you want to find me in chat - perhaps that will be quicker?
Answers.UserDisplayName: RayWright
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-25T18:07:46.733Z
Answers.Text: sry, for now my reputation is to low...
Answers.UserDisplayName: PatricB
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-25T18:11:56.780Z
Answers.Text: Do you have changed any permissions in drupal to let this work?
Answers.UserDisplayName: PatricB
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-22T15:04:40.077Z
Answers.LastActivityDate: 2021-02-22T15:04:40.077Z
Answers.UserDisplayName: RayWright
Body: <p>We are trying to set up a webform to open a case and assign a case role (manager).</p>
  <p>I configured two contacts - coordinator and client - and assigned them to the case in the webform. The client as client and creator and the coordinator to the managing role of the case. For the coordinator contatc I set a static field with a default contact value.</p>
  <p>The open case part works fine, but assigning the coordinator as manager does not work. Instead, the first contact (client) is also assigned as manager.</p>
  <p>I also tried opening a case without a manager being set. But in this case, the manager role is also assigned to the client contact.</p>
  <p>Does anyone have an idea what the problem could be?</p>
  <p><strong>System</strong></p>
  <p>CiviCRM v5.28.2</p>
  <p>Drupal v7.78</p>
  <p>Webform CiviCRM Integration v7.x-5.4</p>
  <p><a href="https://i.sstatic.net/jxBpS.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/jxBpS.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.sstatic.net/n3Re9.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/n3Re9.png" alt="enter image description here" /></a>
  <a href="https://i.sstatic.net/Uh1mu.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Uh1mu.png" alt="enter image description here" /></a>
  <a href="https://i.sstatic.net/qijkr.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/qijkr.png" alt="enter image description here" /></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-01-31T14:26:54.820Z
Comments.Text: In the webform did you set a relationship between the client and the manager? That's how this is implemented in Civi's case system.
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-04T03:01:02.430Z
Comments.Text: I am running slightly different versions of Civi and Webform Integration from you but we do use the webform to case integration heavily. Would you be willing to provide some screenshots of your setup? I'm wondering about the "The client as client and creator and the coordinator to the managing role of the case." portion. In my setups, the client is set as the client but the case creator and case manager are one in the same. (There may be updated language since I am behind a little on my version of the webform integration but I'm still happy to help if I can.)
Comments.UserDisplayName: RayWright
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-14T18:12:33.537Z
Comments.Text: @AndyClark I added them to the roles "Case Client" and  "Case Creator/Manager" in the case tab. Is that what you meant?
Comments.UserDisplayName: PatricB
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-14T18:20:06.680Z
Comments.Text: @RayWright I added a screenshot of my case tab in the webform - do you need more?
Comments.UserDisplayName: PatricB
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-14T19:05:35.890Z
Comments.Text: What I mean is that in a webform, for a contact you can display 'Number of Relationship fields'.  So here you would set that to 1 in the second contact, which I assume is the manager (the first being the client), and in that exposed relationship field you would set the 'Relationship to Contact 1' to be  'Case Manager'.
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-16T14:20:31.553Z
Comments.Text: The screenshot does help me get a better idea of what is set up where. Know I know it may be the case manager field on the webform itself that's causing an issue. Can you share a screenshot of how you have the default value of that field set up?
Comments.UserDisplayName: RayWright
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-20T17:35:46.210Z
Comments.Text: @RayWright I added three screenshots of the field settings. In the previous view of the webform fields I can see the name of the default contact, but in this view the value is always empty after I saved it. Maybe there lays the problem?
Comments.UserDisplayName: PatricB
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-20T17:37:14.740Z
Comments.Text: @AndyClark thx for the hint. I added the relation between case manager an client. Sadly it didn't helped or maybe there are more problems...
Comments.UserDisplayName: PatricB
Tags: <webform-civicrm><civicase><roles>
Title: Open CiviCase via Webform with manager role assigned
ThreadText: # Open CiviCase via Webform with manager role assigned
  
  (Asked by: username_0 on 2021-01-30)
  
  We are trying to set up a webform to open a case and assign a case role (manager).
  
  I configured two contacts - coordinator and client - and assigned them to the case in the webform. The client as client and creator and the coordinator to the managing role of the case. For the coordinator contatc I set a static field with a default contact value.
  
  The open case part works fine, but assigning the coordinator as manager does not work. Instead, the first contact (client) is also assigned as manager.
  
  I also tried opening a case without a manager being set. But in this case, the manager role is also assigned to the client contact.
  
  Does anyone have an idea what the problem could be?
  
  **System**
  
  CiviCRM v5.28.2
  
  Drupal v7.78
  
  Webform CiviCRM Integration v7.x-5.4
  
  [![enter image description here](https://i.sstatic.net/jxBpS.png)](https://i.sstatic.net/jxBpS.png)
  
  [![enter image description here](https://i.sstatic.net/n3Re9.png)](https://i.sstatic.net/n3Re9.png)
  [![enter image description here](https://i.sstatic.net/Uh1mu.png)](https://i.sstatic.net/Uh1mu.png)
  [![enter image description here](https://i.sstatic.net/qijkr.png)](https://i.sstatic.net/qijkr.png)
  
  **Tags:** webform-civicrm, civicase, roles
  
  > **Comments:**
  > **username_1**: In the webform did you set a relationship between the client and the manager? That's how this is implemented in Civi's case system.  
  > **username_2**: I am running slightly different versions of Civi and Webform Integration from you but we do use the webform to case integration heavily. Would you be willing to provide some screenshots of your setup? I'm wondering about the "The client as client and creator and the coordinator to the managing role of the case." portion. In my setups, the client is set as the client but the case creator and case manager are one in the same. (There may be updated language since I am behind a little on my version of the webform integration but I'm still happy to help if I can.)  
  > **username_0**: @AndyClark I added them to the roles "Case Client" and  "Case Creator/Manager" in the case tab. Is that what you meant?  
  > **username_0**: @username_2 I added a screenshot of my case tab in the webform - do you need more?  
  > **username_1**: What I mean is that in a webform, for a contact you can display 'Number of Relationship fields'.  So here you would set that to 1 in the second contact, which I assume is the manager (the first being the client), and in that exposed relationship field you would set the 'Relationship to Contact 1' to be  'Case Manager'.  
  > **username_2**: The screenshot does help me get a better idea of what is set up where. Know I know it may be the case manager field on the webform itself that's causing an issue. Can you share a screenshot of how you have the default value of that field set up?  
  > **username_0**: @username_2 I added three screenshots of the field settings. In the previous view of the webform fields I can see the name of the default contact, but in this view the value is always empty after I saved it. Maybe there lays the problem?  
  > **username_0**: @AndyClark thx for the hint. I added the relation between case manager an client. Sadly it didn't helped or maybe there are more problems...  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2021-02-25. Score: 2 | Accepted answer
  
  **Finally it is working!**
  
  Two where important:
  
  1. Disable "Enforce Permissions" for the contact field in the webform config, filled with a default value.
     [![](https://i.sstatic.net/u1NAf.png)](https://i.sstatic.net/u1NAf.png)
  2. Look out for the field "Update Existing Case" on the CiviCRM tab. It was set to a case status value, so it would change an existing case.
     [![](https://i.sstatic.net/KoeMr.png)](https://i.sstatic.net/KoeMr.png)
  
  Many thanks to @AndyClark and @username_2!
  
  > **Comments:**
  > **username_1**: Glad you got it sorted!  
  
  ---
  
  ### Answer by username_2 on 2021-02-22. Score: 1
  
  All the screenshots are super helpful. I think because you have set it to be a static contact but did not tell it which contact, you are seeing an issue. Can you place the ID number of the desired case manager in the Contact (Kontakt) field right below "Set default contact from: Specified Contact"?
  
  To test that it's working, you might turn on Display Contact Name - just to check that then the form is dispalying the name of the contact you set.
  
  > **Comments:**
  > **username_0**: I tried to place the ID of the contact into the field for the default value, but I can't save it. I can only search and select a contact from the search result. I also turned on "Display Contact Name". If open the webform as anonymouse user, the field for the case manager is empty ("- None Found -"). If open it as logged in user, it is filled with the seleceted contact. (I also disabled "Private" for debugging) I disabled then "Enforce Permissions" and now the default selected contact is set in the result, but sadly no more case is added...  
  > **username_2**: @username_0 I feel like we can get this going but it might be easier to ask several questions at once. If you want to find me in chat - perhaps that will be quicker?  
  > **username_0**: sry, for now my reputation is to low...  
  > **username_0**: Do you have changed any permissions in drupal to let this work?  
  
  ---
  
  