Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Field Copy
Message
From
28/06/1999 02:23:54
Dovi Gilberd
Dovtware Consulting Inc
Miami, Florida, United States
 
 
To
28/06/1999 02:14:35
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00233837
Message ID:
00234638
Views:
47
john....!?
going crazy here...
This is the original function you sent me....!

FUNCTION getrate()
PARAMETERS cDialednbr,cCode,nResult
cRateField="rates.rate"+cCode
IF LEFT(cDialednbr,1)="0"
SEEK LEFT(cDialednbr,6) TAG code IN rates
ELSE
SEEK LEFT(cDialednbr,4) TAG code IN rates
ENDIF
RETURN EVAL(cRateField) * nResult

the field that specifies what rate to use for my customer is
Long_distance.rate

can you do me a favor..fill in the names if the function with my original names...Please..
Cause i dont know wher you gotcratefield....is it the same as long_distance.rate...
And also i did not knwo the part of rate+ccode...

help me out men....? Thanks..









>>>If something is not working with TAG in SEEK, use SET ORDER TO before the SEEKs instead :-)
>>>
>>>>john thank you...something does not seem to be working with the tag commmand..
>>>>thankyou for being patient with me...Got to finish this by tomorrow..
>>>>
>>>>
>>>>
>>>>
>>>>>Hi Dovi ---
>>>>>
>>>>>We'll solve this yet :-)
>>>>>
>>>>>Let's see if I have this right. The customers are in a table called "long_distance" with the following significant fields:
>>>>>code (which is the rate code 1..2...3..etc).
>>>>>Theer is a view, view1, which I assume is a child of long_distance which contains the calls. A significant field in view1 is dialednr with is the number the customer dialed. So far correct?
>>>>>
>>>>>Now, the rate table is (code,country,rate1,rate2,..raten)
>>>>>
>>>>>I am assuming that "result" in your sample code is a time factor, like how many minutes?
>>>>>
>>>>>And you need to solve a given rate for a given view1 record, right? Try this:
>>>>>
>>>>>FUNCTION getrate()
>>>>>PARAMETERS cDialednbr,cCode,nResult
>>>>>cRateField="rates.rate"+cCode
>>>>>IF LEFT(cDialednbr,1)="0"
>>>>>   SEEK LEFT(cDialednbr,6) TAG code IN rates
>>>>>ELSE
>>>>>   SEEK LEFT(cDialednbr,4) TAG code IN rates
>>>>>ENDIF
>>>>>RETURN EVAL(cRateField) * nResult
>>>>>
>>>>>Try this :-)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform