I have been trying to learn how to use the PROPERTY EnhDBGrid FILTER commands 
by trial and error, but without success.  I am hoping someone can fill in the 
blanks for me.  I am 
confident someone has done something similar to this before.  One other note; I 
am using
R:BaseX, not R:BaseX.5

SITUATION  (not using my real data to keep it simple):
  I have a 3 column table named Contacts  with 40 rows
     City          TEXT 32
     State        TEXT 2
     Zipcode    INTEGER

I have a form containing:
   An Enhanded DB Grid Property,    Component ID:  Places   Table: Contacts
      I didn't click any property boxes related to filtering within this 
Property.
   A Variable Radio Group Property, Component ID:  StateGroups 
      that loads variable fState with one of 3 selectable values  'CA' or 'CT' 
or 'WA'

WHAT I WANT TO DO
  I want to use the value loaded in variable fState to filter which rows are 
displayed in 
  the Enhanced DB Grid.  Every time a different Radio Button is selected, 
reloading the
  value of variable fState, have the rows displayed in the Enhanced DB Grid 
change to display
  only those in column State that match the value in variable fState.
  I don't want a filter bar displayed within the Enhanced DB Grid Property, as 
it will
    compete with the Radio Group for user's attention (and State is the only 
column to
    be filtered on).
  I want all filtering to occur behind the scenes using the PROPERTY commands.

WHAT I HAVE TRIED
   To get this filter working, I have tried placing the following commands in
   the forms ON AFTER START EEP - just to see how they work - or not work.  
   My expectation being that when the forms starts, it will display only rows 
     WHERE state = 'CA' (my default for initial display).      Attempt #1  = No 
rows filtered out, all 40 rows displayed
     PROPERTY Places FILTERS->COLUMN_NAME->state 'CA'
   Attempt #2  = No rows filtered out, all 40 rows displayed
     PROPERTY Places FILTERS->COLUMN_NAME->state->ADD_ITEM 'CA'
   Attempt #3  = Error message, "No rows exist or satisfy the specified clause"
     PROPERTY Places FILTERTYPE 'EQUAL'
     PROPERTY Places FILTERS->COLUMN_NAME->state 'CA'

   But none of these commands caused that to happen.  Including the FILTERTYPE 
command   results in No rows being found.  I suspect there are additional 
commands required that I 
   have not been able to identify.  

   Note that I haven't introduced the variable fState into the commands yet to 
make my 
   learning curve simpler.  But once I can make the value 'CA' work, I should 
be able to 
   replace it with .fState and use the PROPERTY commands within the ON CLICK 
EEP 
   for the Variable Radio Group Property.
      
   The RBASE documentation is pretty good at describing what different commands 
do.  
   This is an exercise for me to learn how to put all the commands together 
needed to 
   implement a capability.

I will be very thankful to anyone who can provide me the complete set of 
commands (and/or Enhanced DB Grid property item clicks) needed to make this 
work.

NOTE  I normally do this type of filtering using a Variable Lookup List View 
Property instead 
  of an Enhanced DB Grid Property because it has a WHERE clause capability.  
But the 
  Enhanced DB Grid Property had some features I want to use, like the footer 
for summing 
  and the ability to center the header names within each column, etc.  It also 
forces me 
  to learn how to use the Enhanced DB Grid Property's filter capabilities.

R Hopkins

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rbase-l+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/1792940103.84756.1560295106406%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to