>>First, thank you. Your approach should work and should be my solution. But I have changed the TEXT TO ENDTEXT to a string (because I will store it in the app object). So in my case I have
>>
>> cExpr = "<<tcAliasName>>.INSTOCK + <<tcAliasName>>.ONORDER - <<tcAliasName>>.REORDERPNT"
>>nQty = EVALUATE( cExpr )
>>
>>
>>But I get error Missing Operand. I must be doing something wrong. I will keep checking my syntax.
>>
>>UPDATE. The error is actually Missing Expression, not Operand.
>
>
> cExpr =textmerge( "<< m.tcAliasName >>.INSTOCK + << m.tcAliasName >>.ONORDER - << m.tcAliasName >>.REORDERPNT")
> nQty = EVALUATE( m.cExpr )
>
>
>Or without merging (merging is nice BTW):
>
>
> cExpr = m.tcAliasName + ".INSTOCK + " + m.tcAliasName + ".ONORDER - " + m.tcAliasName +".REORDERPNT"
> nQty = EVALUATE( m.cExpr )
>
>(Without text merging it is a bit obscure using operands)
Thank you, Cetin. I ended up using the Textmerge() approach because I need to save the entire string to an XML file. That is, for different customers the expression may be different.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham