Need to understand the Cascading of Drop down concept when data is from DB tables.

Hi,
Could someone help me understand the concept and solve my below problem?

I have a Two tables

1. VehicleTypes
Field
Id   category
1    Cars
2    Buses
3   Trains

2nd table SubVehicleTypes

SubID Id SubCategory
1         1     Sedan
2         1     Suv
3         2     Luxury
4         2     Semi luxury
5         3     Ac Trains
6         3     Non Ac Trains


Requirements:
1. Drop Down 1 will have data from Table 1
2. Drop Down 2 will have data from Table 2

When I select category from DD1 the second DD2 should give Subcategory based on ID(Common in both Tables).

Thanks
Faisal

  Discussion posts and replies are publicly visible

Parents
  • This is my Raw code

    a!localVariables(
    local!vehicleTypeData:rule!FF_Exp_VehiclesTypes(VehicleId:null),
    local!vehicleSubTypeData:rule!FF_Exp_VehiclesSubTypes(subId:null),
    local!vehicleType,
    local!vehicleSubType,
    {
    a!dropdownField(
    label: "Dropdown",
    labelPosition: "ABOVE",
    placeholder: "--- Select a Value ---",
    choiceLabels: local!vehicleTypeData.category,
    choiceValues: local!vehicleTypeData.id,
    saveInto: {},
    searchDisplay: "AUTO",
    validations: {}
    ),
    a!dropdownField(
    label: "Dropdown",
    labelPosition: "ABOVE",
    placeholder: "--- Select a Value ---",
    choiceLabels: local!vehicleSubType,
    choiceValues: local!vehicleSubType,
    saveInto: {},
    searchDisplay: "AUTO",
    validations: {}
    )
    })

Reply
  • This is my Raw code

    a!localVariables(
    local!vehicleTypeData:rule!FF_Exp_VehiclesTypes(VehicleId:null),
    local!vehicleSubTypeData:rule!FF_Exp_VehiclesSubTypes(subId:null),
    local!vehicleType,
    local!vehicleSubType,
    {
    a!dropdownField(
    label: "Dropdown",
    labelPosition: "ABOVE",
    placeholder: "--- Select a Value ---",
    choiceLabels: local!vehicleTypeData.category,
    choiceValues: local!vehicleTypeData.id,
    saveInto: {},
    searchDisplay: "AUTO",
    validations: {}
    ),
    a!dropdownField(
    label: "Dropdown",
    labelPosition: "ABOVE",
    placeholder: "--- Select a Value ---",
    choiceLabels: local!vehicleSubType,
    choiceValues: local!vehicleSubType,
    saveInto: {},
    searchDisplay: "AUTO",
    validations: {}
    )
    })

Children