Dependent Dropdowns with Composite Types

Dependent Dropdowns with Composite Types

Comments

  • [font=Roboto, Arial, Helvetica, sans-serif]Do you have any example or provide me technical guidance on how to create dependent dropdowns that are populated with complex objects. The basic example given at [/font][url=https://documentation.decisions.com/docs/creating-dependent-drop-down-menu-options]https://documentation.decisions.com/docs/creating-dependent-drop-down-menu-options[/url][font=Roboto, Arial, Helvetica, sans-serif] works only with string but how do I set the "value" of 2nd drop down so that correct value is displayed on 2nd dropdown and also the correct value is internally selected.[/font]

    [font=Roboto, Arial, Helvetica, sans-serif]For example, There is an Employee Object (DisplayName, EmployeeID, Department). We want Dropdown 1 to show the employee and Dropdown 2 to show Manager. When dropdown 1 is selected, I can get the whole object as "SelectedEmployee". But using that data, how do I "select" Manager from dropdown 2, given that selected value is an object and not a string.[/font]

  • Once youve got the dropdown lists components set up with a data type, a field selected to display for the data type, and data names for both the list of data and the dropdowns selected item, you can populate your dropdown lists with inputs on the forms step in a flow, or by using a [url=https://documentation.decisions.com/docs/using-flow-data-form]Data Flow[/url]. Dropdown lists have a selection changed event which can be used to trigger a data flow. The data flows input could be configured to be the selected employee from your parent dropdown list, and the data flow could have a Fetch Entities step with criteria to get the selected employees manager based on its AccountID or another relevant parameter. To change the selected item of the child dropdown list, you would output an entire object of the same type as the child dropdown list from the data flow and configure the data flows settings to update the selected item data name of the child dropdown list. The key differences between this use case and the example from the documentation are that objects are being fetched instead of using constant strings, that the data being handled is a composite type, and that the secondary dropdown has criteria for which objects should be used to populate its list.
    Note: Here is a relevant post from our forum about this: [url=https://support.decisions.com/forum/topic300-cascading-inputs.aspx]Cascading Inputs[/url]

Sign In or Register to comment.