>Everybody,
>
>I have created a class that has a custom property called "cAliasName". This property represents the alias for a temporary table. In this table, I have a field called "periods". How do I get value of the "Periods" field.
>
>For example the value in the "Periods" field is 12 and I want the varable lnPeriods to equal 12.
>
>I have tried the following and several other but continue to get errors.
>lnPeriods = Eval(This.cAliasName)->Periods
>lnPeriods = &This.cAliasName->Periods
>lnPeriods = (This.cAliasName)->Periods
What others have told you should work, unless you got trailing spaces in cAlias name. To avoid this:
lnPeriods=evaluate(forceext(this.cAliasName, alltrim("Periods")))
Forceext() function keeps the trailing or leading blanks in the extension, that's why I trimmed it. If you're running VFP before 6, load FoxTools first.