When I do search forms, I have the fields on the form and the user types in the 
values to search.  There's a search button that constructs a "where" clause.  

Parts of the code look like this.  In my case, I would have a list view on the 
form that displays the matching records, with the "where" clause in its lookup, 
but I put your Edit using in the example:


SET VAR vCWhere TEXT = "invoice IS NOT NULL"

IF vBalDue = "T" THEN
  SET VAR vCWhere = (.vCWhere & "AND baldueInv > 0")
ENDIF

IF vID IS NOT NULL THEN
  SET VAR vCWhere = (.vCWhere & "AND id = .vID")
ENDIF

SELECT COUNT(*) INTO vfCount FROM vInvoice WHERE &vCWhere
IF vfCount > 0 THEN
    EDIT USING JobDetails WHERE &vCWhere
  --PROPERTY listview REFRESHLIST "TRUE"   (this is what I do)
ELSE
  PAUSE 2 USING "Sorry, no Invoice records meet your search criteria!"
ENDIF


Karen



-----Original Message-----
From: dkfowler6179 <[email protected]>
To: RBASE-L <[email protected]>
Sent: Fri, May 11, 2018 1:52 pm
Subject: [RBASE-L] - User defined search

Using R:Base X latest version.
I'm trying to figure out how to make some sort of user definable search.  My 
thoughts are to have a form with drop downs for the columns I want them to be 
able to search and conditions of the search.  I can make the form and generate 
the search criteria as a variable.  Just cant figure out how to get that to run 
as a search.
Example:
Set var tsearch=.v0&.v1&.v2&.v3&.v4&.v5
Gets me:
Edit using jobdetails where number=45878 
as the value for tsearch.
How can I use this variable (tsearch) to actually run?  Or am I totally off 
base and there's a better way to go about this?

Thanks for any ideas.
David Fowler

-- 
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].
For more options, visit https://groups.google.com/d/optout.

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to