Tony,   I like your solution.  But I found a problem.  According to the 
Property Command Manual, the PROPERTY LOOKUPWHERECLAUSE property is only valid 
for the following controls:  Variable Lookup Combo Box, Variable Lookup List 
Box, and Variable Lookup List View.  It isn't listed for the Enhanced DB Grid 
control.  The WHERE clause for these variable lookup controls can alternately 
be defined within these controls within the Lookup tab. Much to my frequent  
dismay, there is no Lookup tab for the the Enhanced DB Grid control - one must 
use filter properties instead - which are much more limited.  
But just to be sure the document wasn't out of date,  I tested it in my form 
with its Enhanced DB Grid control.  RESULT: no rows were displayed.  This is 
the same result when the PROPERTY command is commented out, as shown below in 
my On Click EEP for the Variable Radio Group control. 

SET vfilter = 'all'    --value is actually set by Variable Radio Group control 
IF vfilter = 'all'  THEN
--PROPERTY EnhDbGrid LOOKUPWHERECLAUSE 'where FullName is not null'
ENDIF

But until your reply, I was unaware of the LOOKUPWHERECLAUSE property.  It will 
be something I use in the future.  It must be new, since it isn't even listed 
in my RDocs tool.  

I appreciate your time to share this with me
Richard Hopkins

    On Wednesday, November 29, 2023 at 02:07:32 PM PST, Tony Luck 
<[email protected]> wrote:  
 
 Morning Richard,I have a form that contains a variable radio group that sets 
filters similar to what you're doing. Using the on Click I use the following
IF vfilter = 'all' THEN
  PROPERTY fflist LOOKUPWHERECLAUSE 'where pond_id is not null'
  GOTO cleanup
ENDIF

In your case I would think the where statement would be "is null". This shows 
the option as being selected. Hope it helps
On Thu, Nov 30, 2023 at 7:53 AM 'R Hopkins' via RBASE-L 
<[email protected]> wrote:

Hopefully, one of you has solved this puzzle before.

I am using a form that contains only one Variable Radio Group property one 
Enhanced DB Grid properties. The value selected in the Variable Radio Group 
property is used to filter the values in a column in the Enhanced DB Grid 
property with a LIKE comparison.  Here are the details, with an example.

The Variable Radio Group property contains 4 selections:  "Bill", "Sam", 
"Will", "All".  Upon clicking any one of these selections, the Variable Radio 
Group's Value is loaded into a variable.  The Caption and the Value (which 
becomes the value in the variable of type TEXT) are the same, except for "All", 
which is NULL (no value entered on the property tab).  For the Enhanced DB Grid 
property, the Filter Type is LIKE, and the column filtered is FullName.

This form works as desired.  Selecting any Caption properly filters the rows 
displayed, and selecting "All" results in all rows in the table being 
displayed.  My problem is cosmetic.  When the Caption "All" is selected, the 
word "All" gets a box drawn around it, like any other selection, but unlike the 
other selections, its radio button does not fill in.  This happens because the 
Value for this selection is NULL.  

I have tried substituting the following wildcard values for NULL; "%", "_".   
But when used in the LIKE comparator, no rows are displayed instead of all rows 
being displayed.  Using " " (a single space), all rows are displayed, but the 
radio button does not fill - behaves the same as using NULL. 

Interestingly, using the comparable command at the R> yields an error.
  SET VAR vValue TEXT = NULL
  BROWSE * FROM TableName WHERE FullName LIKE .vValue
   -ERROR - Nulls cannot be used in comparisons other than NE or EQ  (2315)
  BROWSE * FROM TableName WHERE FullName LIKE &vValue
   <WARNING> No rows exist or satisfy the specified clause.  (2059)
Whereas the following displays all rows without an error message
  SET VAR vValue TEXT = '%'
  BROWSE * FROM TableName WHERE FullName LIKE .vValue

Anyone have any tricks for what value I should put in the Value field of the 
Variable Radio Group for the "All" caption to make it display all rows AND fill 
in the button?  Is this something I should report as a bug (after all, a box 
does get drawn around the word "All" when it is selected)?

Richard 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/175052776.5218885.1701294805381%40mail.yahoo.com.



-- 
Regards
Tony

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/CABnhDATs6m1A_s9zkcjNxErQa88puKUa-06tunAF9w0LKNaSWg%40mail.gmail.com.
  

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/2100868777.5294641.1701316735462%40mail.yahoo.com.

Reply via email to