>hi dragan..im using this code that returns the rate code that i chose for the customer..
>what else do i need to ad to it to obtain the correct value for that call under that rate plan...? please.......
>
>
>
>FUNCTION getrate()
> PARAMETERS Result
> cRateField="long_distance.rate"
> select rates
> set orde to tag code
>
> IF LEFT(view1.dialednr,1)='0'
> SEEK LEFT(view1.dialednr,6)
> endif
>
> IF LEFT(view1.dialednr,1)="#"
> SEEK LEFT(view1.dialednr,3)
> endif
>
> if LEFT(view1.dialednr,1)='1'
> SEEK LEFT(view1.dialednr,4)
> ENDIF
> RETURN EVAL(cRateField)
What's the content of the long_distance.rate field? If it is something like Rate1, Rate2 or so, you should omit the quotes in the beginning line, i.e. it should read
cRateField=long_distance.rate
If it contains just a number, the line should read
cRateField="rate"+alltrim(str(long_distance.rate,3,0))
This way you prepare the string that you EVAL()uate in the end.