Jump to content

problem Evaluate-ing a text formula


This topic is 6989 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I can't get the Evaluate function to give me what I want -- I figure there's something simple I'm missing.

2 fields: txErrorMessage (text) and ctErrorMessage (calc, text). txEM and ctEM for short.

txEM contains a FMP-calc as it's contents and I want ctEM to Evaluate the calc. Simple enough -- just letting a user type new error messages, using field references if needed, into a field instead of a calc field or custom dialog.

here's the contents of txEM that i'm working with:

 "Your " &TB|SYSPREFS::txAppName&" software license for "& TB|SYSPREFS::txRegisteredCompany& 

" will expire on "&Datetotext(TB|SYSPREFS::dtExpiration)&". Please contact "&TB|SYSPREFS::txCompanyName& 

" at "&TB|SYSPREFS::txSupportNumber&" for more information."

I've tried several variations in the ctEM using Evaluate, GetField, and Quote and none of them are giving me a properly propigated text string back. I either get a ? as a result or the literal contents of the txEM field -- I can't get it to actually return the values in the fields.

I read through FMP's help and also the great Using FM7 book and have tried the exact formatting the author's use on page 391, except in mine I'm calling a field with the contents of the formula to be evaluated.

Any help here is much appreciated. I'm sure there's a combination of quotes or functions that I missed to make this work.

Link to comment
Share on other sites

For the purposes of debugging, try copying the contents of the txEM field directly into the formula definition of the ctEM. That will help you debug the syntax of the formula. Once that is working, you can copy the formula back into txEM. Then your ctEM formula will simply be: Evaluate(txEM)

But, do you really need to use the Evaluate function at all? Does the user need to change the formula in txEM, or will it be permanent? If permanent, you can just put the txEM formula directly into the ctEM formula definition.

Link to comment
Share on other sites

This topic is 6989 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.