I'm having trouble with .setfilter function. Well, I manage to make it work. What seems to be my problem is that I have a dropdown list and a datawindow. Everytime I clicked or picked on that dropdown the value will filter in my datawindow and I have that "ALL" item on my dropdown list when I picked that supposed to be it will go back to the original data in the datawindow which didn't filter anything but it's showing nothing. I know I'm missing some logic on my script. Any help would be very much appreciated. Thank you so much!
Here is what I have. I attached the image also for your reference.
string s_colname, s_criteria, s_null, s_dtefrom, s_dteto, ls_datefrom, ls_dateto, ls_filter, s_sysrefno
long l_count, l_row
datawindowchild dwc_child, dwc_station
s_colname = this.getcolumnname()
Choose case s_colname
is_station = this.getitemstring(1,'station')
// in this part what im trying to do is to reload the datawindow without the filter.
if is_station = '' or isnull(is_station) or is_station = '000' then
s_criteria = is_station
dw_activate_spots.SetFilter("ordd_stncde = '"+ s_criteria +" '")
// "ordd_stncde = '"+ is_station +" '"+ " AND " + "ordd_teledte >= Date('" + String(idt_from, "mm/dd/yyyy") + "')" + " AND " + " ordd_teledte <= Date('" + String(idt_to, "mm/dd/yyyy") + "')"