Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Table.filter problems

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-18-2008, 11:23 PM
Junior Member
 
Join Date: Jun 2007
Posts: 44
Default Table.filter problems

Hi All,

I'm having problems adding multiple filters to a table. The filter uses variables which can be user defined during runtime via menu items on the main form. Each variable returns the correct value before the table.filter expression is run so no problem there. The runtime produces no syntax errors so again no problem there. The filter just doesn't 'filter'.

Eg TableOut.Filter("Flt2 = '" & legs & "' and " & dayout & " <> '' ")

ie. Return the rows in column Flt2 that contain the string 'legs'. Legs is user selectable to either 'direct' or '*' (wildcard); and return the rows under column dayout which contain something; dayout is a predefined day of the week variable.

When run, the filter expression works OK with 'direct' but returns nothing with '*' wildcard. Also, the full expression actually looks like this:-

TableOut.Filter("Flt2 = '" & legs & "' and " & dayout & " <> '' or Ax='" & Airlinenz & "'or Ax='" & Airlineek & "'or Ax='" & Airlineqf & "'or Ax='" & Airlinejq & "'or Ax='" & Airlinedj & "'")

...a mouth full I know... It seems that as soon as I add more than a couple of filter terms none of the filter terms work yet if you reduce back to just one term sometimes it works and other times it does not. It's very confusing so if there is an easier way I'm all ears.

Thanks,

JT
Reply With Quote
  #2 (permalink)  
Old 08-19-2008, 07:19 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You should replace '=' with 'LIKE' if you want to use wildcards.
Add parenthesis to better control the logic precedence.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve table filter from the filtered table? LineCutter Questions (Windows Mobile) 1 09-08-2008 06:20 AM
Table filter (AND & OR) LineCutter Questions (Windows Mobile) 1 08-24-2007 01:29 PM
save filter of a table manu Questions (Windows Mobile) 4 08-23-2007 03:46 PM
table filter matter francisco cobos Questions (Windows Mobile) 5 06-04-2007 07:01 AM
Table.Filter Phil Budge Questions (Windows Mobile) 2 05-16-2007 09:35 PM


All times are GMT. The time now is 10:18 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0