Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I had a client ask if there was a way to enter an expression in a field like 10/2 and have it return 5, or 10*2 and have it return 20. I see no way to do it even with a script and button to process. Am I missing something easy here? Anyone have a clever way to do that in a single field? I need to do this one in both FM6 and 7

Posted

In fm 7, you can use the evaluate() function to do it: go to the field option, auto-enter -> calculate -> evaluate(fieldname)

Rem. to uncheck do not replace existing value for field

Posted

If the source field is a text field called Expression, use a calc field = Evaluate(Expression).

There is a danger though; users could type in the names of fields and have those evaluate too, possibly showing sensitive data. Make sure your security schema protects against users not viewing records they shouldn't have access to.

Posted

Thanks, I will give it a go. Any ideas for v6? I thought of capturing the contents of the field, but short of parsing it and using a script to evaluate the many possible iterations, +-*/ and so on, I don't see another way.

Posted

I think there was a plugin that does that in 6, but I can't think of the name right now.

This topic is 7473 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.