Jump to content

Use Expression in Field


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

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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