Jim,

Oops. Sorry about that. Make these changes in your process button.

SET VAR vQuotes = (CVAL('QUOTES'))
SET VAR vtvchoice NOTE = NULL
SET VAR vRows = (ITEMCNT(.vchoice ))
SET VAR vtvchoice = ('('+.vchoice+')')
IF vRows > 0 THEN
  PRINT KayParkOutsourcePO WHERE YOURCOLUMNAME IN &vtvchoice 
  OPTION SCREEN|WINDOW_STATE MAXIMIZED +
  |ZOOM_TYPE PERCENTAGE|ZOOMPERCENT 100
ELSE
  PAUSE 2 USING 'No Matching Records Found!'
ENDIF

Jan


-----Original Message-----
From: "Jim Belisle" <[email protected]>
To: [email protected] (RBASE-L Mailing List)
Date: Wed, 20 May 2009 13:36:16 -0500
Subject: [RBASE-L] - Re: variable list view


I
Jan,
I have set up the form as you mentioned below.  I get the vchoice to work 
and it picks up any orders I click on. However the var vcount is not being 
recognized. I even set that variable as shown below.
SET VAR vcount INTEGER = 0
SELECT COUNT (*) INTO vcount IND vin0 FROM OrderDetail &vchoice
IF vcount > 0 THEN
  PRINT KayParkOutsourcePO &vchoice +
  OPTION SCREEN|WINDOW_STATE MAXIMIZED +
  |ZOOM_TYPE PERCENTAGE|ZOOMPERCENT 100
ELSE
  PAUSE 2 USING 'No Matching Records Found!'
ENDIF
I get the error message “Syntax is incorrect for the command SELECT”
Jim



From: [email protected] [mailto:[email protected]] On Behalf Of jan johansen
Sent: Wednesday, May 20, 2009 10:04 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: variable list view
Jim, 
  
I noticed you had not received any information on 
using a VariableListView. Hopefully this explanation 
does not get bit blasted (I watched TRON again). 
  
1. Create a FORM not attached to any table so a true 
variable form. In it place 2 bit buttons and a 
VariableListView. 
  
2. In the FORM BeforeStartEep place this code; 
SET VARIABLE vChoice TEXT = NULL 
RETURN 
  
3. In the VariableListView do the following; 
PROPERTIES TAB 
  VARIABLE vChoice 
  Check the Recalc Form Variables Box 
EFFECTS TAB 
  Check the MultiSelect Box 
LOOKUP SETTINGS TAB 
  Fill in the appropriate information for the lookup 
ON CLICK EEP 
  RECALC VARIABLES 
  RETURN  
  
4. One of your buttons is your CANCEL button. 
Just select the pre-defined Discard Row and Exit 
  
5. Your other button is the process button. 
Place your existing code in it as such 
SELECT COUNT (*)  INTO vcount IND vin0 FROM Orders &vchoice 
IF vcount > 0 THEN 
  PRINT KayParkOutsourcePO &vchoice + 
  OPTION SCREEN|WINDOW_STATE MAXIMIZED + 
  |ZOOM_TYPE PERCENTAGE|ZOOMPERCENT 100 
ELSE 
  PAUSE 2 USING 'No Matching Records Found!' 
ENDIF 
  
6. So now your original code should just do 
EDIT USING MyNewForm 
  
7. Go back to your form and make it pretty by 
putting in all the do-dads and error checking you wish. 
  
I hope this gets you started. 
  
Jan 

  
-----Original Message----- 
From: "Jim Belisle" <[email protected]> 
To: [email protected] (RBASE-L Mailing List) 
Date: Tue, 19 May 2009 11:48:21 -0500 
Subject: [RBASE-L] - variable list view 
I have a very simple Bit button that allows the sales individual to print a 
specific report based on their filling out the WHERE builder.  
The command is below. It was suggested I use a Variable List View as a means 
of allowing them to choose the specific orders rather than typing them into 
a WHERE clause.  I would like to do just that.  I have never used the 
Variable List View and have tried to figure it out but the HELP has not 
given me much information.  Is there a thread I could read to help me 
understand how to use it properly? 
Jim 
-- Print Outsource PO by a list of Control#. -- 
CLEAR VAR vchoice, vcount, vin0 
SET VARIABLE vchoice TEXT = NULL 
SET VAR vcount INTEGER = 0 
SET ERROR MESSAGE 2045 OFF 
CHOOSE vchoice FROM #WHERE IN Orders 
SELECT COUNT (*)  INTO vcount IND vin0 FROM Orders &vchoice 
IF vcount > 0 THEN 
  PRINT KayParkOutsourcePO &vchoice + 
  OPTION SCREEN|WINDOW_STATE MAXIMIZED + 
  |ZOOM_TYPE PERCENTAGE|ZOOMPERCENT 100 
ELSE 
  PAUSE 2 USING 'No Matching Records Found!' 
ENDIF 
CLEAR VAR vchoice, vcount, vin0 
SET ERROR MESSAGE 2045 ON 
RETURN 

Reply via email to