March 21, 201213 yr Let ([ $n = $n + 150 ; Calc = "getnthrecord (TableA::ChargeFoundSet; $n ) & ¶ & " ]; Evaluate ( Calc ) ) thanks, -i
March 21, 201213 yr Try this and see what it returns: Let ([ $n = $n + 150 ; Calc = "getnthrecord (TableA::ChargeFoundSet; $n ) & ¶ & " ]; EvaluationError( Evaluate ( Calc ) ) )
March 21, 201213 yr Author 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 ) ")
March 21, 201213 yr Author 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 & ¶ &
March 22, 201213 yr 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.
Create an account or sign in to comment