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

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-13-2007, 03:16 PM
Newbie
 
Join Date: May 2007
Posts: 2
Default Table.Filter

With the Table.Filter command is it possible to use variables as the Column and Arguement as I can only make this function work with fixed values.
Reply With Quote
  #2 (permalink)  
Old 05-13-2007, 04:38 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 1,057
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Arrow

Hi Phil,

let's take the following Table

Table1.AddCol(cNumber, "Number", 50)
Table1.AddCol(cString, "Value1", 50)
Table1.AddCol(cString, "Value2", 50)

Table1.AddRow(1, "A1", "red")
Table1.AddRow(1, "A2", "green")
Table1.AddRow(2, "A2", "blue")
Table1.AddRow(2, "A2", "white")
Table1.AddRow(2, "A4", "black")

and these two variables

arg1 = 2
arg2 = "A2"

For a column with cNumber format we could code this filter

Table1.Filter("Number = " & arg1)

Result: the rows with "blue", "black" and "white".

To code a filter with a column of cString format you have to add some ' around the variables like

Table1.Filter("Value1 = '" & arg2 & "'")

Result: the rows with "green", "blue" and white.


specci48
Reply With Quote
  #3 (permalink)  
Old 05-16-2007, 09:35 PM
Newbie
 
Join Date: May 2007
Posts: 2
Default

Thanks specci48 that explained the syntax ( I've only been using BASIC4PPC a couple of days)
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 problems J12345T Questions (Windows Mobile) 1 08-19-2008 07:19 AM
Filter a table on keypresses Offbeatmammal Questions (Windows Mobile) 5 06-01-2008 07:29 PM
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


All times are GMT. The time now is 06:40 AM.


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