NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: terryd on May 14, 2014, 01:57:16 AM

Title: Filtering a dropList
Post by: terryd on May 14, 2014, 01:57:16 AM
In the "start of Option Filter & Order" embed point of an application I have
     IF p_web.getSessionLevel() <= 4 !Dealers
          WOR:OrderStatusID_OptionView{prop:filter} = p_web.CleanFilter(WOR:OrderStatusID_OptionView,'WOS:DisplayOrder <= 2 ')
      END
Which works fine. It only displays the WOS:DisplayOrder = 1 and     WOS:DisplayOrder = 2 records.
I now want to also display WOS:DisplayOrder = 5
I tried
     IF p_web.getSessionLevel() <= 4 !Dealers
          WOR:OrderStatusID_OptionView{prop:filter} = p_web.CleanFilter(WOR:OrderStatusID_OptionView,'WOS:DisplayOrder <= 2 AND WOS:DisplayOrder = 5 ')
      END
but nothing is displayed in the drop down.

What is the correct command?
Title: Re: Filtering a dropList
Post by: kevin plummer on May 14, 2014, 03:57:50 AM
on the template tick the box to send the filter to debug view
Title: Re: Filtering a dropList
Post by: jari@softmade.fi on May 14, 2014, 04:37:12 AM
WOS:DisplayOrder <= 2 AND WOS:DisplayOrder = 5 is impossible

Regards Jari
Title: Re: Filtering a dropList
Post by: debzidoodle on May 14, 2014, 05:07:43 AM
Quote
WOS:DisplayOrder <= 2 AND WOS:DisplayOrder = 5 is impossible

I think you are wanting this
Code: [Select]
WOS:DisplayOrder <= 2 OR WOS:DisplayOrder = 5
Title: Re: Filtering a dropList
Post by: terryd on May 14, 2014, 10:00:58 PM
Thanks everyone. I can't believe after 30 years I can make a stupid mistake line using AND when I should use OR.
Maybe sometimes there are stupid questions.
against stupidity the gods themselves contend in vain