Difference between revisions of "Conditional Lists of Values"

From SmartWiki
Jump to: navigation, search
 
(17 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
==Overview==
 +
The article describes how to configure conditional lists of values in custom field. These lists, also known as dependent dropdown lists, change their available options based on the selection made in another, related field (the Parent Field). This functionality is applicable to custom fields:
 +
 +
* [[Custom Field Type: Select Many – Check Boxes|Select Many – Check Boxes]]
 +
* [[Custom Field Type: Select One - Dropdown List]]
 +
 +
The article explains the configuration process using the '''ssOption''' syntax and provides examples of how these conditional lists work in practice.
 +
 +
==Configuration==
 
The list of values selectable in a custom field can be made conditional upon the value selected in another custom field. This functionality can be configured on the following [[:Category:Custom Field Types|custom field types]]:
 
The list of values selectable in a custom field can be made conditional upon the value selected in another custom field. This functionality can be configured on the following [[:Category:Custom Field Types|custom field types]]:
* [[Custom Field Type: Select Many – Check Boxes|Select Many – Check Boxes]]
 
* [[Custom Field Type: Select Many – List Box|Select Many – List Box]]
 
* [[Custom Field Type: Select Many – Scrolling Check Box|Select Many – Scrolling Check Box]]
 
* [[Custom Field Type: Select One – Combo Box|Select One – Combo Box]]
 
  
[[Image:Canada-Ontario-Cities.jpg|link=]]
+
{|
 +
|-
 +
||[[Image:Canada-Ontario-Cities.jpg|link=]]
 +
||or
 +
||[[Image:US-Texas.jpg|link=]]
 +
|}
  
 
To configure this functionality, for each dependent field:
 
To configure this functionality, for each dependent field:
* define the field that will condition the dependent values as the "Parent Field"
 
* surround the dependent values with the ssOption syntax:
 
  
:<font size="3">&lt;ssOption: ''Parent Value 1''>''Dependent Value 1'';''Dependent Value 2''&lt;/ssOption></font>
+
* Define the field that will condition the dependent values as the "Parent Field".
 +
* In the settings page of the "Child Field", there's a drop down field called "Parent Field" - this must be populated with the "Parent Field" being referenced.
 +
* Surround the dependent values with the '''ssOption''' syntax:
 +
 
 +
<pre>&lt;ssOption:Parent Value 1>;Dependent Value 1;Dependent Value 2&lt;/ssOption></pre>
 +
 
 +
In the configuration shown below:
 +
 
 +
* In the ''Province'' field
 +
** ''--Select One--'' will always be shown,
 +
** ''Ontario'' and ''British Columbia'' will only be shown if ''Canada'' is selected in the ''Country'' field, and
 +
** ''Texas'' will only be shown if ''United States'' is selected in the ''Country'' field.
 +
 
 +
<pre>--Select One--&lt;ssOption:Canada>;Ontario;British Columbia&lt;/ssOption>&lt;sOption:United States>;Texas&lt;/ssOption></pre>
 +
 
 +
* In the ''City'' field
 +
** ''-- N/A --'' will always be shown,
 +
** ''Toronto'' and ''Ottawa'' will only be shown if ''Ontario'' is selected in the ''Province'' field, and
 +
** ''Vancouver'' will only be shown if ''British Columbia'' is selected in the ''Province'' field.
 +
 
 +
<pre>--N/A--&lt;ssOption:Ontario>;Toronto;Ottawa&lt;/ssOption>&lt;ssOption:British Columbia>;Vancouver&lt;/ssOption></pre>
  
 
[[Image:Conditional Lists - Combined.jpg|link=]]
 
[[Image:Conditional Lists - Combined.jpg|link=]]
- new option "Parent Field" added for custom field types of combo boxes, radio buttons, and check boxes
 
- "Parent Field" is to indicate if the options of the combo box/check box field are dependent to the value of another field
 
- once selected, you can put <ssOption> syntax to indicate what options to show based on what values
 
eg. --Select One--<ssOption:Canada>;Ontario;British Columbia</ssOption>
 
- this means, "--Select One--" will always show
 
- "Ontario" and "British Columbia" will only show if the parent field is "Canada"
 
another eg: -- N/A --<ssOption:Ontario>;Toronto;Ottawa</ssOption><ssOption:British Columbia>;Vancouver</ssOption>
 
- "-- N/A --" always show
 
- "Toronto" and "Ottawa" will show if the parent field is "Ontario"
 
- "Vancouver" will show if the parent field is "British Columbia"
 
  
This supports up to n levels and it does NOT support dynamic control fields
+
==Note==
 +
* Any number of lists of values can be made dependent on other lists of values.
 +
* This feature will not work in conjunction with [[Custom Field Type: Dynamic Data – Dynamic Control Field|Dynamic Control fields]].
 +
* This feature will not work with [[Standard Field|Standard Fields]] e.g. Application Type. Even if standard field is available to select as a '''Parent Field'''.
 +
 
 +
==See Also==
 +
* [[Custom Field Type: Select Many – Check Boxes|Select Many – Check Boxes]]
 +
* [[Custom Field Type: Select One - Dropdown List]]
 +
* [[Show/Hide Header]]
 +
* [[Custom Field Type: Dynamic Data – Dynamic Control Field|Dynamic Control fields]]
 +
* [[Custom Lookup Options]]
  
 
[[Category:Custom Fields]]
 
[[Category:Custom Fields]]

Latest revision as of 08:09, 26 January 2024

Overview

The article describes how to configure conditional lists of values in custom field. These lists, also known as dependent dropdown lists, change their available options based on the selection made in another, related field (the Parent Field). This functionality is applicable to custom fields:

The article explains the configuration process using the ssOption syntax and provides examples of how these conditional lists work in practice.

Configuration

The list of values selectable in a custom field can be made conditional upon the value selected in another custom field. This functionality can be configured on the following custom field types:

Canada-Ontario-Cities.jpg or US-Texas.jpg

To configure this functionality, for each dependent field:

  • Define the field that will condition the dependent values as the "Parent Field".
  • In the settings page of the "Child Field", there's a drop down field called "Parent Field" - this must be populated with the "Parent Field" being referenced.
  • Surround the dependent values with the ssOption syntax:
<ssOption:Parent Value 1>;Dependent Value 1;Dependent Value 2</ssOption>

In the configuration shown below:

  • In the Province field
    • --Select One-- will always be shown,
    • Ontario and British Columbia will only be shown if Canada is selected in the Country field, and
    • Texas will only be shown if United States is selected in the Country field.
--Select One--<ssOption:Canada>;Ontario;British Columbia</ssOption><sOption:United States>;Texas</ssOption>
  • In the City field
    • -- N/A -- will always be shown,
    • Toronto and Ottawa will only be shown if Ontario is selected in the Province field, and
    • Vancouver will only be shown if British Columbia is selected in the Province field.
--N/A--<ssOption:Ontario>;Toronto;Ottawa</ssOption><ssOption:British Columbia>;Vancouver</ssOption>

Conditional Lists - Combined.jpg

Note

  • Any number of lists of values can be made dependent on other lists of values.
  • This feature will not work in conjunction with Dynamic Control fields.
  • This feature will not work with Standard Fields e.g. Application Type. Even if standard field is available to select as a Parent Field.

See Also