Answers.Body: <p>CiviCRM is pretty egalitarian - they are all just Individuals.  </p>
  
  <p>There are various ways you could model this which depends to some extent on what you want to do based on that data.</p>
  
  <p>One option is Relationships - eg create a Manager/Managee relationship and create relationships for all the places where you have lines.  If you want to record a level in the hierarchy you could use a custom field.</p>
  
  <p>If you want to use those relationships to control access (so that eg Line Manager1 can see only P1, P2, P3) then have a look at the <a href="https://civicrm.org/extensions/relationship-permissions-acls" rel="nofollow noreferrer">Relationship Permissions ACL extension</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-16T07:05:05.593Z
Answers.Text: In my scenario only LM1 can see the information of P1, P2, P3 and B1.Not the other record. Currently everyone can see the all data. I want such a kind of restriction. How can I achieve that ?
Answers.UserDisplayName: Dipak Giri
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-16T19:29:00.193Z
Answers.Text: Both Aidan and I have provided you with information on how to do this. For us to provide more help you probably need to explain how you have applied our suggestions.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-15T17:01:36.030Z
Answers.LastActivityDate: 2018-11-15T17:01:36.030Z
Answers.UserDisplayName: Aidan
Answers.Body: <p>I agree with Aidan. </p>
  
  <p>However if you go for Related Permissions approach I would suggest you introduce a concept between LM1 and P1, P2 and P3. eg i would create a Practitioner Group as an Org. So you would then connect </p>
  
  <ul>
  <li><p>LM1 to PG1</p></li>
  <li><p>PG1 to P1, P2 and P3.</p></li>
  </ul>
  
  <p>The reason is so that if LM1 leaves and you need to bring in LM1b in to the story then all you need to do is break the relationship between LM1 and PG1 and create one for LM1b to PG1.</p>
  
  <p>You then turn on 'second degree permissions' and that ensures that LM1 can only see all those daisy-chained contacts via PG1.</p>
  
  <p>Hard to explain - easier to draw but hopefully you get the idea.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-16T05:23:28.470Z
Answers.Text: What is this 'second degree permission'?
Answers.UserDisplayName: Dipak Giri
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-16T06:59:14.507Z
Answers.Text: By the way, is it possible such kind of hierarchical structure?
Answers.UserDisplayName: Dipak Giri
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-16T10:15:51.643Z
Answers.Text: Good point Pete - certainly makes it easier to update later despite looking a little more complex to set up initially.
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-16T10:16:44.450Z
Answers.Text: Re 'second degree permissions' see the link in my previous answer
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-29T08:55:40.240Z
Answers.Text: I tried it but not working properly.
Answers.UserDisplayName: Dipak Giri
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-29T19:21:38.717Z
Answers.Text: what does 'not working properly' mean?
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-30T04:42:40.413Z
Answers.Text: LM1 can see the data of P1 and P2. P1 and p2 can't see the data of LM1. But the p1 and p2 can see there own data.
Answers.UserDisplayName: Dipak Giri
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-30T20:26:52.567Z
Answers.Text: You will need to provide very specific information if you are hoping the community can help you with these. i.e. detail every step you took in setting up Permissioned Relationships - that way someone may spot a step you missed
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-30T20:53:25.420Z
Answers.Text: fyi i found this place where i answered similar question https://civicrm.stackexchange.com/questions/19442/multiple-branch-chapter-management-with-various-access-level-of-information
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-15T18:09:47.667Z
Answers.LastActivityDate: 2018-11-15T18:09:47.667Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>I want to maintain a following hierarchical structure for different user.How can I do that?<br>
  If any extension is available then let me know.<br><a href="https://i.sstatic.net/P7BLx.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/P7BLx.png" alt="enter image description here"></a></p>
  
Tags: <data-model>
Title: How will I maintain a hierarchical structure in civicrm?
ThreadText: # How will I maintain a hierarchical structure in civicrm?
  
  (Asked by: username_0 on 2018-11-15)
  
  I want to maintain a following hierarchical structure for different user.How can I do that?  
  If any extension is available then let me know.  
  [![enter image description here](https://i.sstatic.net/P7BLx.png)](https://i.sstatic.net/P7BLx.png)
  
  **Tags:** data-model
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-11-15. Score: 2 | Accepted answer
  
  CiviCRM is pretty egalitarian - they are all just Individuals.
  
  There are various ways you could model this which depends to some extent on what you want to do based on that data.
  
  One option is Relationships - eg create a Manager/Managee relationship and create relationships for all the places where you have lines. If you want to record a level in the hierarchy you could use a custom field.
  
  If you want to use those relationships to control access (so that eg Line Manager1 can see only P1, P2, P3) then have a look at the [Relationship Permissions ACL extension](https://civicrm.org/extensions/relationship-permissions-acls)
  
  > **Comments:**
  > **username_0**: In my scenario only LM1 can see the information of P1, P2, P3 and B1.Not the other record. Currently everyone can see the all data. I want such a kind of restriction. How can I achieve that ?  
  > **username_2**: Both username_1 and I have provided you with information on how to do this. For us to provide more help you probably need to explain how you have applied our suggestions.  
  
  ---
  
  ### Answer by username_2 on 2018-11-15. Score: 2
  
  I agree with username_1.
  
  However if you go for Related Permissions approach I would suggest you introduce a concept between LM1 and P1, P2 and P3. eg i would create a Practitioner Group as an Org. So you would then connect
  
  * LM1 to PG1
  * PG1 to P1, P2 and P3.
  
  The reason is so that if LM1 leaves and you need to bring in LM1b in to the story then all you need to do is break the relationship between LM1 and PG1 and create one for LM1b to PG1.
  
  You then turn on 'second degree permissions' and that ensures that LM1 can only see all those daisy-chained contacts via PG1.
  
  Hard to explain - easier to draw but hopefully you get the idea.
  
  > **Comments:**
  > **username_0**: What is this 'second degree permission'?  
  > **username_0**: By the way, is it possible such kind of hierarchical structure?  
  > **username_1**: Good point Pete - certainly makes it easier to update later despite looking a little more complex to set up initially.  
  > **username_1**: Re 'second degree permissions' see the link in my previous answer  
  > **username_0**: I tried it but not working properly.  
  > **username_2**: what does 'not working properly' mean?  
  > **username_0**: LM1 can see the data of P1 and P2. P1 and p2 can't see the data of LM1. But the p1 and p2 can see there own data.  
  > **username_2**: You will need to provide very specific information if you are hoping the community can help you with these. i.e. detail every step you took in setting up Permissioned Relationships - that way someone may spot a step you missed  
  > **username_2**: fyi i found this place where i answered similar question https://civicrm.stackexchange.com/questions/19442/multiple-branch-chapter-management-with-various-access-level-of-information  
  
  ---
  
  