Jump 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.

Featured Replies

does anybody know why below evaluate function require back slash between a+1 & b+2 ? it wouldn't work without it. and i noticed that in let calculation , "&a+1,b+2&" will work.

why do i must use back slash in evaluate calc and not in a let calc ?

calc =

Evaluate ( "Let ( [ " &"A=5 , B=10"& " ] ; a+1 & ", " & b+2 )" )

regards,

kyle

You're still missing some backslashes here and there... the point is that everything inside the evaluate quotes is regarded a string ... but if a quote comes along the way, is it a Evaluate( end mark or is it just the arrival of a text string inside the actual calc ...every arriving quote along the reading direction that means somethng for the calc' should be backslashed.

Indeed utterly confusing until you work methododically with the flow in the string!

--sd

Hi Kyle,

Evaluate evaluates a string that you provide as if it were a real expression. Lets pretend you have two fields for a second. Field one is a text field called "expression" field two is a calc field called "result":

Create a new record and dump this into your expression field: Let( A = 5 ; a + 1 )

Now, for your result field, simply reference your text field (i.e. table::expression) and do nothing else.

What you're result field will return is the exact same string that you provided it with: Let( A = 5 ; a + 1 )... note that the string has not been evaluated because it is a STRING and while it resembles an expression, the calc engine doesn't see it as one.

Now, go back to your result field and enclose your field reference in Evaluate tags: Evaluate( table::field ).

Note the output.

Even though you are providing a string, Evaluate is processing the string as if it were an expression you had placed directly in via the calc engine.

Now, for the evaluate function to work properly you have to understand that it is expecting a string (i.e. "text" or field contents), not an expression entered directly in via the calc dialog.

Let's go back to our example again...

The contents of the field is return as a string so Let( A = 5 ; a + 1 ) in a field is exactly the same as "Let( A = 5 ; a + 1 )" in a calc dialog.

Anyway, the point of evaluate is more to evaluate varying expressions or otherwise construct dynamic expressions.

From the example you've given I think you may be misusing it (always helps to have more information) - If all you wanted to do was add the above to your variables then you would just go:

Let( [ A = 5 ; B = 10 ] ;

a+1 & ", " & b+2 )

In relation to your question though: if you wanted to actually use a literal string inside an evaluate expression you have to remember that the Evaluate expression will try to evaluate the entirety of the string you give it, to let it know you actually want to incorporate a normal string you would have to enclose in quotes without breaking the expression string i.e:

"Let( [ A=5 ; B=A+5 ] ; "A = " & A & ", B = A+5 =" & B )"

Which would look like the following to the evaluate function:

Let( [ A=5 ; B=A+5 ] ; "A = " & A & ", B = A+5" & B )

HTH

Create an account or sign in to comment

Important Information

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

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.