Brian Dunning's FileMaker Custom Functions

SetVariable ( Variable ; Value )

Set local ( when you use in script step ) or global variable, conditionally.

  Average rating: 4.8 (29 votes) Log in to vote

Koji Takeuchi   Koji Takeuchi - Show more from this author
TonicNote, Inc.
https://tonicnote.com

Share on Facebook Share on Twitter

  Sample input:
SetVariable ( "$foo" ; "bar" )
  Sample output:
$foo = "bar"

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

SetVariable ( Variable ; Value )
2011.08.15, Koji Takeuchi


description:
Set local ( when you use in script step ) or global variable.
ex1.
SetVariable ( "$foo" ; "bar" )
-> $foo = "bar"
ex2.
Let (
val =
"$$" &
Month ( ORD_ORDER::date_order ) & "." &
Day ( ORD_ORDER::date_order ) & "." &
Year ( ORD_ORDER::date_order ) ;
SetVariable ( val ; Sum ( ORD_order_ORDER|samedate::amount ) )
)
-> $$8.15.2011 = 1,520,470

 

Comments

stu jacobs   stu jacobs, pompano beach fl
Aug 18, 2011
very cool!!
 
Koji Takeuchi   Koji Takeuchi, TonicNote, Inc.
Nov 1, 2011
Oops, I found a fatal bug!
Sorry, just fixed.
 
Koji Takeuchi   Koji Takeuchi, TonicNote, Inc.
Dec 25, 2011
Fixed a problem when Value includes "¶".
 
Koji Takeuchi   Koji Takeuchi, TonicNote, Inc.
Apr 15, 2014
Fixed a problem when Value is like calc string.
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: