Dependent Field Visibility
Dependent field visibility is disabled by default because it has a not insignificant performance impact on the client (browser) side. To enable, set the following in app.conf:
enable_dependent_field_visibility = 1
Once enabled a few new settings become available for List metadata elements with render type "Drop-down list" or "Radio buttons". Note that this will not work with any of the other render modes!
A new config setting will appear on the metadata element configuration screen for each item in the list. These settings allow you to select the bundle placements to hide when this list item is chosen. Remember to hold the Cmd/Ctrl key when selecting multiple items in these lists.
The bundle placements are organized by UI and screen. Every UI that applies to any of the tables for that metadata element is going to show up.
That's it! Once you navigate to a screen that has the List metadata element and select one of the items, the system will hide all the items configured on-the-fly in your browser.
Note that existing metadata in the hidden fields/bundles is not lost!. The fields are just hidden from the UI.
Configuration in profiles
To set this up at install time, you have to have the app.conf setting enabled (see above). Then you can add settings to List metadata elements as follows:
<metadataElement code="image_format" datatype="List" list="image_format"> <labels> ... </labels> <settings> <setting name="hideIfSelected_image_gif">standard_object_ui/format/ca_attribute_formatNotes</setting> <setting name="hideIfSelected_image_gif">standard_object_ui/format/ca_attribute_dimensions</setting> </settings> <typeRestrictions> ... </typeRestrictions> </metadataElement>
The setting name is hideIfSelected_<idno_of_list_item>. Replace idno_of_list_item with the idno of the list item that should trigger the hide action. In the example above that's "image_gif". The value of the setting consists of three parts, delimited by a slash:
code of the editor UI / idno of the screen / placement code
Since neither screen idnos nor placement codes are enforced to be unique globally, we need the full combination to identify a particular bundle placement on a specific screen in a given UI.