How to associate one entity definition to another using member relation

Prerequisite: Sitecore Content Hub 4.1.1 Sandbox

Inline with my earlier blog, this blog article covers details of how to work with relations. Here, I associate one entity to another using a relation member:

1. Choose your entity and for that entity, add a new member of type relation:


2. Provide a name for the relation member, I named it myrelationalmember and provided associated definition as myschema -  a custom schema i created early-on but, you can choose any (entity or taxonomy) schema from the list:


3. The following list of cardinality is available to link the current entity (testschema) to the associated entity (myschema):


onetoone: one testschema entity can be related to one myschema entity
onetomany: one testschema entity can be related to many myschema entities
manytomany: many testschema entities can be related to many myshema entities

4. In the conditional tab for the relation member, I can as usual see the option list and taxonomy members part of this entity schema: 


5. I add a conditional for the taxonomy member, save and subsequently apply changes:


6. Now, on the entity detail page, on selecting "my tax item 1" in the taxonomy list, related entities get filtered:


7. Select the concerned entity and save to see the changes.


As ever, the new entity must be visible in the entity list.


So, here is the summary of steps involved:

a. Choose a entity schema and add a relation member
b. Associate the relation member to another schema
c. Next, add a conditional to the relation member 
d. The conditional, in turn, is capable of picking taxonomy and option list members
e. In the Conditional for the relation member, reference the taxonomy or option list member and choose an item for visibility of the relation member or so-called entity in this case


Comments

Popular Posts