For Coach View components we don't have custom visibility.
In side Coach visibility options
Inside Coach View visibility options
If we want to add custom visibility inside coach view we don't have default options we have to customize the coach view.
Example Scenario
we have select and text CV inside coach view. based on selected value we need to show or hide the text coach view.
Solution:
1.Get the Vertical Section sub-view inside the change event handler.
var n1 = this.context.getSubview("Vertical_Section1", true)[0];
2.Get the selected value of select box and compare with your value.if Selected value is yes the shoe the text CV else Hide the CV.
Write the below code in both view and change.when loading and changing the select box this script will apply.
var n1 = this.context.getSubview("Vertical_Section1", true)[0];
if(this.context.options.seletedItem.get("value").get("name")=="YES")
{
var n2 = n1.context.getSubview("Text1", true)[0];
n2.context.setDisplay(true);
n2.context.options._metadata.visibility.set("value","DEFAULT");
}
if(this.context.options.seletedItem.get("value").get("name")=="NO")
{
var n2 = n1.context.getSubview("Text1", true)[0];
n2.context.setDisplay(false);
}
Results:
1. When we select Yes we are showing the text CV.
2.When we select No we are hiding the text CV.
Hope this is useful....................