Brian Dunning's FileMaker Custom Functions

SetWindowVar ( keyOrIndexOrPath ; value ; JSONType )

Set a global variable scoped to the current window

  Be the first to rate this function Log in to vote

Jason Wood   Jason Wood - Show more from this author
Define Database
https://www.definedatabase.com

  Sample input:
SetWindowVar ( "hello" ; "world" ; JSONString )
  Sample output:
{"Window name will be here":{"hello":"world"}}

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

See also: GetWindowVar() and DeleteWindowVar()

Works like JSONSetElement() but only one key, index, or path can be set at one time. You could chain together multiple SetWindowVar like:

Set Variable [ $blah ; SetWindowVar ( "hello" ; "world" ; JSONString ) & SetWindowVar ( "goodbye" ; "moon" ; JSONString ) ]

...just don't use the output directly from this calculation ($blah) as it will be invalid JSON.

 

Comments

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 21 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: