Hi All,
I have one Dynamic Drop down.
Now I wan to use this collect an information for purchasing.
In my code I am capturing Ids (as value and savinto).
But while writing to DB along with other vehicle details In I want the entry of choice label text for saving the form in DB.
Could you please suggest how can I do?
My Codes are here: and It is working:::
a!localVariables( local!vehicleTypeData:rule!FF_Exp_VehiclesTypes(VehicleId:null), /*local!vehicleSubTypeData:rule!FF_Exp_VehiclesSubTypes(typeId:null),*/ local!type, local!subType, local!saveSubType,{ a!dropdownField( label: "Dropdown", labelPosition: "ABOVE", placeholder: "--- Select a Value ---", choiceLabels: index(local!vehicleTypeData,"category",null), choiceValues: index(local!vehicleTypeData,"id",null), value:local!type, saveInto: {local!type,a!save(local!subType, rule!FF_Exp_VehiclesSubTypes(typeId: save!value).data)}, searchDisplay: "AUTO", validations: {} ), a!dropdownField( label: "Dropdown", labelPosition: "ABOVE", placeholder: "--- Select a Value ---", choiceLabels: index(local!subType,"subcategory",{}), choiceValues: index(local!subType,"subid",{}), saveInto: local!saveSubType, value: local!saveSubType, searchDisplay: "AUTO", validations: {}, disabled: isnull(local!type) )})
Discussion posts and replies are publicly visible
Can you clarify what you're still wanting to do with this? The code you posted looks like it would work (though I'd suggest moving the query for subType into the local variable based on what the current type selection is).
For a Vehicle form.. I need to capture the name of the Type and Subtype of the vehicle and write to DB. I want to use this DD and capture the name as mentioned in Choice labels.
Lets say: Choice Labels are "BUS", "TRAINS","CAR" and Choice values are 1,2,3 as ids....But in my DD I am saving Idss. So how I can save for a form on selection BUS or Train or Car?
Why not just use the ID value you have captured already as a result of the original dropdown? You can make a query entity call that queries directly on a single ID and returns only the "category" or "subcategory" fields (whichever you need), which would execute very quickly.
Thank you Mike..I will try that and get back to you if I have issues.