When extending the Sitecore Content Hub schema, certain fields may only be needed under specific conditions. Displaying these fields at all times can reduce efficiency. I introduce a feature that controls the display of these fields to address this issue.
![](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F4cjsd6OLKDRWzre6X4IIJ8%2F4511cf2e6011433b5ceb5e4886dcc88b%2Fschema09.gif&w=3840&q=75)
Prerequisite
In this article, we will be working with the Sitecore Content Hub after it has been set up. The version we are working with is 4.1.5, but this feature is version-independent as it has been available since before the acquisition of this product.
Extend the schema
First, let's briefly extend the schema of the asset. First, if you open the schema of M.Asset, you will see the following settings.
![schema01.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F38FWsfBHDgU7ptdx9KzFct%2F4bcf271a0d7edc3090acb6ea2156cc97%2Fschema01.png&w=3840&q=75)
For the sake of clarity, we will add a member called DemoText to Overview.
![schema02.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F1vPtAJ8B6lqPku7QaViyLP%2Ffdd555670af1eda01f50b40fa804a0b0%2Fschema02.png&w=3840&q=75)
We want to add text, so we select PROPERTY.
![schema03.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2FrSr2wcMaVsAwHtdAREkT2%2F7aff4b7bfeb8946bf10620b1895716a5%2Fschema03.png&w=3840&q=75)
Select String to set the string.
![schema03.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2FrSr2wcMaVsAwHtdAREkT2%2F7aff4b7bfeb8946bf10620b1895716a5%2Fschema03.png&w=3840&q=75)
Then add a schema called DemoText. Change the title to Demo Text at least (it is just a visual part, and since it is a validation, it can be the same as it is).
![schema04.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F4IdBVyPTxlnPHAqJBdLvt%2F8ce4857cea566f17e436c7c9290f04e6%2Fschema04.png&w=3840&q=75)
After changing the settings, click the Apply Changes button. The schema will then be expanded. When you select an asset, the following items are displayed.
![schema05.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F3IP5VqgJU2ldm7jAnywlF6%2F5aa0ec54a20e9489996c0f168182c905%2Fschema05.png&w=3840&q=75)
You can see that the standard Demo Text item has been added.
Controlling the display
Go back to the Demo Text section in the schema definition again. You will see that there is a tab called Conditional as a setting.
![schema06.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F4vCK0HdfuUhVb5ncRr0hSM%2F7c24b6c29ccbf20d735b62129e407055%2Fschema06.png&w=3840&q=75)
Once you have made your selection, a field for entering this item will appear.
![schema07.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F3h1DzrZhuyULtVhUa8AmbS%2F38b22f67144812c8b190d3c2d9f7cc8c%2Fschema07.png&w=3840&q=75)
Originally, we need to create a precondition to control the display, but this time we select a FactSheet that is included in AsssetTypeToAsset as a sample from the beginning because it will be the default item.
![schema08.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F2D8vm38GeTC2ocioWcf3uj%2F710e215b6dc4105c8e7cf3afdabd6619%2Fschema08.png&w=3840&q=75)
After changing the settings, click on the Apply Changes button to apply the settings. You will see that additional items will appear when you make selections as shown below (animated Gif).
![schema09.gif](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F4cjsd6OLKDRWzre6X4IIJ8%2F4511cf2e6011433b5ceb5e4886dcc88b%2Fschema09.gif&w=3840&q=75)
This allowed us to see that when we selected an item, the items related to it were displayed.
Summary
As the number of input items increases, more data will appear on the screen. By setting up the system so that items appear only when they must be entered in conjunction with something else as an item for this purpose, you can also improve work efficiency by avoiding the appearance of items that are not normally needed.