- Michael Quintus
- PowerBuilder
- Thursday, 11 July 2024 03:57 PM UTC
Okay, hopefully I can explain this correct enough that it makes sense.
TL/DR: Datawindow with multiple rows doesn't always show the DisplayColumn because of the where clause in the DDDW query.
We have a datawindow that returns multiple rows. In each of those rows has a dddw that needs to be filtered based on that row. The relationship to the dropdown is based on an ID field in the datawindow query, while the filter is based on a separate ID field.
Originally we had it set up so AutoRetrieve was off and the dddw query was retrieved on the rowfocuschanged event. This worked great, but I wanted to change the display value to a description rather than the ID. After doing so the dddw doesn't have the necessary values retrieved so the DataColumn would display rather than the DisplayColumn. Changing the row updates that rows dddw, so then the display works correctly when it's focused, but the other rows that lose focus don't display correctly.
Setup:
Window -> Datawindow (multiple rows) -> dddw for each row
DDDW filtered by ID1 but uses ID2 as the DataColumn.
Things I've tried:
- 2 dddw that have visibility set to whether the row is focused.
- This didn't work because users would have to double click on the dropdown for it to expand.
- pbm_dwndropdown
- Couldn't get this to trigger.
- Removing the ID from the where clause of the DDDW and trying to set a filter in the rowfocuschanged event
- Couldn't figure out how to reset the filter for all rows except the focuses row.
If I could get the entire dataset in the dddw it would be fine and show the DisplayColumn correctly; then I just need to figure out how to correctly filter the drop down when it expands.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.