{"id":347,"date":"2004-10-18T02:35:08","date_gmt":"2004-10-17T18:35:08","guid":{"rendered":"http:\/\/foxpro.ntsl119.com\/scr\/?p=347"},"modified":"2007-10-29T11:25:59","modified_gmt":"2007-10-29T03:25:59","slug":"combo-box-filter-issues","status":"publish","type":"post","link":"https:\/\/foxpro.ntsl119.com\/scr\/archives\/347","title":{"rendered":"Combo Box Filter Issues"},"content":{"rendered":"<p>Imagine you have a combo box.<\/p>\n<p>This combo box holds (and displays) the &#8216;NAME values&#8217; which are records in database F but returns the &#8216;IDNO values&#8217;. (I&#8217;ll explain the logic behind this on a different post&#8230; later.)<\/p>\n<p>Database F contains only those two fields: the &#8216;NAME values&#8217; which are mostly items\/descriptions and its corresponding &#8216;IDNO values&#8217; (or CODE or CODENUMBER whatever you prefer, lovely-lady-of-mount-lithsoma).<\/p>\n<p>Now you &#8216;morph&#8217; your combo box so that the text part would accept manual character entries and automatically filters the DropDown Items after its InteractiveChange event is triggered.<\/p>\n<p>Now here&#8217;s the question&#8230;<\/p>\n<p>If the user types, let&#8217;s say&#8230; the characters &#8216;CHART&#8217;, would you filter all the records having the string &#8216;CHART&#8217; in it or just the records starting with the &#8216;CHART&#8217; string?<\/p>\n<p>In other words would you:<\/p>\n<blockquote><p><font size=\"2\" face=\"Tahoma, Verdana, sans-serif\">set filter to   cBUFFER $ (upper(alltrim(DBASE.NAMEVALUE)))<\/font><\/p><\/blockquote>\n<p>&#8230; or would you:<\/p>\n<blockquote><p><font size=\"2\" face=\"Tahoma, Verdana, sans-serif\">set filter to   cBUFFER $ substr(DBASE.NAMEVALUE, 1, nLEN)<\/font><\/p><\/blockquote>\n<p>&#8230; given that:<\/p>\n<blockquote><p><font size=\"2\" face=\"Tahoma, Verdana, sans-serif\">cBUFFER = upper(alltrim(this.Text))<br \/>  nLEN = len(alltrim(cBUFFER))<\/font><\/p><\/blockquote>\n<p>\nJust some little issues I&#8217;m pondering on at <font size=\"2\" face=\"Tahoma, Verdana, sans-serif\">2:30<\/font> in the morning.<\/p>\n<p>(And I am so tempted already to activate the comments feature of this blog.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Imagine you have a combo box. This combo box holds (and displays) the &#8216;NAME values&#8217; which are records in database F but returns the &#8216;IDNO values&#8217;. (I&#8217;ll explain the logic behind this on a different post&#8230; later.) Database F contains only those two fields: the &#8216;NAME values&#8217; which are mostly items\/descriptions and its corresponding &#8216;IDNO [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,10],"tags":[],"class_list":["post-347","post","type-post","status-publish","format-standard","hentry","category-visual-foxpro","category-workblog"],"_links":{"self":[{"href":"https:\/\/foxpro.ntsl119.com\/scr\/wp-json\/wp\/v2\/posts\/347","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/foxpro.ntsl119.com\/scr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/foxpro.ntsl119.com\/scr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/foxpro.ntsl119.com\/scr\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/foxpro.ntsl119.com\/scr\/wp-json\/wp\/v2\/comments?post=347"}],"version-history":[{"count":0,"href":"https:\/\/foxpro.ntsl119.com\/scr\/wp-json\/wp\/v2\/posts\/347\/revisions"}],"wp:attachment":[{"href":"https:\/\/foxpro.ntsl119.com\/scr\/wp-json\/wp\/v2\/media?parent=347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/foxpro.ntsl119.com\/scr\/wp-json\/wp\/v2\/categories?post=347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/foxpro.ntsl119.com\/scr\/wp-json\/wp\/v2\/tags?post=347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}