I've tried a variety of approaches from my own head as well as what I've found on the forum, and I have to be missing something.
I have two dropdowns on UX that both need to be filtered on a single parent control value.
- if the parent control is a dropdown, I can set the "cascading dropdown" parameters on one of the child dropdowns, but not both. I can create a hidden duplicate parent control dropdown and set the second child to filter on the second parent. I can use the onChange event on parent 1 to set the value of parent 2
- if the parent control is a dropdown or other data-based control, I can use Javascript in the onChange event of the parent dropdown to filter both child dropdowns (like this https://forum.alphasoftware.com/show...ading+dropdown)
Both of these work fine for entering a record. But for editing a record, using the first setup there is no onChange event to set the filter of the child 2 dropdown. It seems that child 1 is still filtered by parent 1 (because parent 1 is editable(?) but the hidden parent 2 control can't be editable because its source data is the same field as parent 1). And in the second approach, the children are only filtered based on the onChange event which doesn't fire when the UX is loaded. So let's assume I put Javascript in the onRenderComplete to set the filters. This also works, but if there was a value in the control from a previous edit, the value is lost when the control is re-filtered.
This all seems complicated, but at the end of the day, I just need more than one dropdown filtered on a single value, and I need those dropdowns to have the filter and hold their value if I re-open the record (well, and if I get this figured out, I'd also like a second filtered dropdown to work in a repeating section, but first things first).
Help?
I have two dropdowns on UX that both need to be filtered on a single parent control value.
- if the parent control is a dropdown, I can set the "cascading dropdown" parameters on one of the child dropdowns, but not both. I can create a hidden duplicate parent control dropdown and set the second child to filter on the second parent. I can use the onChange event on parent 1 to set the value of parent 2
- if the parent control is a dropdown or other data-based control, I can use Javascript in the onChange event of the parent dropdown to filter both child dropdowns (like this https://forum.alphasoftware.com/show...ading+dropdown)
Both of these work fine for entering a record. But for editing a record, using the first setup there is no onChange event to set the filter of the child 2 dropdown. It seems that child 1 is still filtered by parent 1 (because parent 1 is editable(?) but the hidden parent 2 control can't be editable because its source data is the same field as parent 1). And in the second approach, the children are only filtered based on the onChange event which doesn't fire when the UX is loaded. So let's assume I put Javascript in the onRenderComplete to set the filters. This also works, but if there was a value in the control from a previous edit, the value is lost when the control is re-filtered.
This all seems complicated, but at the end of the day, I just need more than one dropdown filtered on a single value, and I need those dropdowns to have the filter and hold their value if I re-open the record (well, and if I get this figured out, I'd also like a second filtered dropdown to work in a repeating section, but first things first).
Help?
Comment