imoree Posted March 21, 2012 Posted March 21, 2012 Let ([ $n = $n + 150 ; Calc = "getnthrecord (TableA::ChargeFoundSet; $n ) & ¶ & " ]; Evaluate ( Calc ) ) thanks, -i
Vaughan Posted March 21, 2012 Posted March 21, 2012 Try this and see what it returns: Let ([ $n = $n + 150 ; Calc = "getnthrecord (TableA::ChargeFoundSet; $n ) & ¶ & " ]; EvaluationError( Evaluate ( Calc ) ) )
imoree Posted March 21, 2012 Author Posted March 21, 2012 Try this and see what it returns: Let ([ $n = $n + 150 ; Calc = "getnthrecord (TableA::ChargeFoundSet; $n ) & ¶ & " ]; EvaluationError( Evaluate ( Calc ) ) ) #1204 = Number, text constant, field name or "(" expected However, running it like this gives me a result. I am so confused why? Evaluate ( " GetNthRecord ( TableA::ChargeFoundSet; 3 ) ")
comment Posted March 21, 2012 Posted March 21, 2012 Check the value of the variable Calc before it's being evaluated.
imoree Posted March 21, 2012 Author Posted March 21, 2012 Check the value of the variable Calc before it's being evaluated. Check the value of the variable Calc before it's being evaluated. It didn't like this & ¶ &
Vaughan Posted March 22, 2012 Posted March 22, 2012 Correct. Be careful of using Evaluate() on the contents of a field. It opens up the FMP-equivilent of SQL injection attacks that could be used to change global variables.
Recommended Posts
This topic is 4999 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