Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

problem Evaluate-ing a text formula

Featured Replies

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.

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.

I presume this is version 7, or you wouldn't have Evaluate()?

So use 'GetAsText()' instead of 'Datetotext'.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.