rogermax Posted June 11, 2004 Share Posted June 11, 2004 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 More sharing options...
H.P. Posted June 11, 2004 Share Posted June 11, 2004 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 Link to comment Share on other sites More sharing options...
Ender Posted June 11, 2004 Share Posted June 11, 2004 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 More sharing options...
rogermax Posted June 11, 2004 Author Share Posted June 11, 2004 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 More sharing options...
Fitch Posted June 11, 2004 Share Posted June 11, 2004 I think there was a plugin that does that in 6, but I can't think of the name right now. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now