I have a browse with 3 tabs using different sort keys and a control that stores a variable responsible for browse filter value. When this control is accepted I call this code
CASE FilterValue OF 1 ! BRW1.SetFilter('(PRE:Field1 = 0)','MyFilter') ThisWindow.Reset(True) OF 2 ! BRW1.SetFilter('(PRE:Field1 <> 0)','MyFilter') ThisWindow.Reset(True) OF 3 ! All records, clear filter BRW1.SetFilter('','MyFilter') ThisWindow.Reset(True) END
and also in “Browse After the initialization” embed to apply it when browse is opened (variable is stored in ini file)
The problem is that when user selects other tab the filter is not applied - all records show on a browse. I have to click on the filter control to execute the above code. Looks like the filter is appled “per tab” as I can apply different filters for each tab and when I change tabs these filters are in place. How can I apply my filters to all tabs (sort orders) ?