I have dw.area (area_id,area_name)
and dw.office (area_id,office_id,office_name)
I want to create a dropdown in datawindow. When I check area_id
I'd like to retrieve office_name
.
How can achieve this with a script?
I have dw.area (area_id,area_name)
and dw.office (area_id,office_id,office_name)
I want to create a dropdown in datawindow. When I check area_id
I'd like to retrieve office_name
.
How can achieve this with a script?
If you want the "display value" of a drop down datawindow you could try using the GetText function, otherwise the way of accessing values in a drop down datawindow object is to use the GetChild function of your datawindow using the 'area_id' column. Once you get a valid reference to the child datawindow control, you can perform functions on it just like any other datawindow column.
So the GetChild returns reference to your second datawindow and assigns it to a variable. Then instead of using dw.office.xx you'd use the variable name assigned via GetChild. Don't forget to check the return code of GetChild and the reference is one of the arguments passed by reference, the return value is simply a return code.
Is this what you were looking for?