Android Question B4XTable Search each word not whole string?

tsteward

Well-Known Member
Licensed User
Longtime User
Can I use the search feature in B4XTable to split what is typed into the search box to filter and highlight each word.
At the moment if I type "Ford Wheel" that is exactly what it will search for.
Can I get it to search for "Ford" and or "Wheel"?
 

Mahares

Expert
Licensed User
Longtime User
Can I get it to search for "Ford" and or "Wheel"?
For this you can use CreateDataView:
B4X:
Dim s1 As String ="Ford"
Dim s2 As String ="Wheel"
B4XTable1.CreateDataView($"c1 LIKE  '%${s1}%' OR c1  LIKE  '%${s2}%' "$)   'c0 is 1st col, c1 is 2nd, c2 is 3rd of in memory table

Can I use the search feature in B4XTable to split what is typed into the search box to filter and highlight each word.
For this you probably have to change the code for B4XTable class
 
Last edited:
Upvote 0

Magma

Expert
Licensed User
Longtime User
Hi there..please check this

Of course this is sql direct to dB... but easily can change to b4xtable sql like mahares..
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…