AnsweredAssumed Answered

"Let" fails using variable but succeeds with $variable

Question asked by historychef on Mar 29, 2013
Latest reply on Mar 30, 2013 by historychef

Summary

"Let" fails using variable but succeeds with $variable

Product

FileMaker Pro

Version

12.0v3

Operating system version

Mac OS X 10.6.8

Description of the issue

Using Evaluate with a Let statement within a custom function succeeds if I use "$local" variables, but not with ordinary Let variables

Steps to reproduce the problem

Consider the following definition of a custom function, in which "initialContents" is a parameter:

Let (
     [ $$__DQN = $$__DQN + 1
     ; a = "$$__DQ" & Right( 1000000 + $$__DQN; 6 )
     ]
     ; Evaluate( "Let (" & a & " = " & Quote( initialContents ) & "; a )" )
)

Expected result

$$__DQ000001 (the number will vary)

Actual result

?

Workaround

Let (
     [ $$__DQN = $$__DQN + 1
     ; a = "$$__DQ" & Right( 1000000 + $$__DQN; 6 )
     ; $a = a
     ]
     ; Evaluate( "Let (" & a & " = " & Quote( initialContents ) & "; $a )" )
)

Outcomes