I use database list services to show database contents and have been using the following code to hide a component if it appears as 'undefined' (caused by the column being empty for that particular item):
if (value == undefined) {
element.hide();
} else {
element.show();
}
return value;
The solution above is working great. My question is: Can I use the same solution to hide other components as well? For example, the code above says "hide 'component_1' when 'component_1' appears as undefined". How can I make it say "hide 'component_2' when 'component_1' is undefined"?