Buddy,

I’m intrigued.  I’m trying this and all I get is:

vmilelist          = (3,4,5)                                  TEXT    
V1                 = (3+4+5)                                  TEXT    
V2                 = SET VAR VTotal = (3+4+5)                 TEXT 

VTotal is not being evaluated.

Claudine 

________________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Walker, Buddy
Sent: Saturday, July 02, 2005 9:44 PM
To: RBG7-L Mailing List
Subject: [RBG7-L] - RE: Choose problem

Claudine
  If your variable is always coming back as (3,5) then you could do this
 
 Assuming your variable V1 is text and has a value of  '(3,5)' 
 
R>SET VAR V1 = (SRPL(.V1,',','+',0))
R>SHO VAR V1
(3+5)
R>SET VAR V2 = ('SET VAR VTotal =' & .v1)
R>sho var
Variable           = Value                                   Type
------------------   ------------------------------          --------
#DATE              = 07/02/2005                               DATE    
#TIME              = 22:38:31                                 TIME    
#PI                = 3.14159265358979                         DOUBLE  
SQLCODE            = 0                                        INTEGER 
SQLSTATE           = 00000                                    TEXT    
V1                 = (3+5)                                    TEXT    
V2                 = SET VAR VTotal = (3+5)                   TEXT    
 
R>&v2
R>sho var
Variable           = Value                                   Type
------------------   ------------------------------          --------
#DATE              = 07/02/2005                               DATE    
#TIME              = 22:38:40                                 TIME    
#PI                = 3.14159265358979                         DOUBLE  
SQLCODE            = 0                                        INTEGER 
SQLSTATE           = 00000                                    TEXT    
V1                 = (3+5)                                    TEXT    
V2                 = SET VAR VTotal = (3+5)                   TEXT    
VTotal             = 8 
 

________________________________________
From: [email protected] on behalf of Claudine Robbins
Sent: Sat 7/2/2005 7:11 PM
To: RBG7-L Mailing List
Subject: [RBG7-L] - Choose problem
Hi everyone,

I have a simple goal:

01. Pick two or more choices from a view, return integer values strung along
in a text variable

02. Somehow transform the values inside the variable back into integers and
add them up

So far, this is what I have:

CHOOSE vmilelist FROM #VALUES FOR DISTINCT (loc_desc &
(ctxt(plusminus))),plusminus +
FROM v_plusminus +
WHERE active_fl_28 = 'Y' +
ORDER BY loc_desc +
CHKBOX 0 +
TITLE 'Add Mileage' +
CAPTION 'LOCATIONS PLUS MINUS MILES' +
LINES 25 +
FORMATTED
SET VAR  vmilelist = ('(' + .vmilelist + ')')

My choose looks like this:

DULAC-LA 3     <===
REDDELL-LA 8
MAMOU-LA 11
FRANKLIN-TX 5  <===

The value returned is 3 and 5 and the text variable vmilelist looks like
this: (3,5)

The result I want is integer 8, i.e. the sum of 3 and 5.

Can I get there from here?

TIA,

Claudine :)

--- RBG7-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
================================================

Reply via email to