Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
JS.GetGlobalProperty
Queries global property.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| JavaScript | 10.0 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example |
|---|---|---|
| JSRef | The JavaScript reference number. | $js |
| Name | The name of the variable. | "test" |
Result
Returns JSON value or error.
Description
Queries global property.Returns value as JSON encoded.
Examples
Get and set some properties:
Set Variable [ $js ; Value: MBS( "JS.New" ) ]
# try number
Set Variable [ $r ; Value: MBS( "JS.SetGlobalProperty"; $JS; "v1"; 123 ) ]
Set Variable [ $v1 ; Value: MBS( "JS.GetGlobalProperty"; $JS; "v1") ]
# try some JSON array
Set Variable [ $r ; Value: MBS( "JS.SetGlobalProperty"; $JS; "v2"; "[1,2,3]" ) ]
Set Variable [ $v2 ; Value: MBS( "JS.GetGlobalProperty"; $JS; "v2") ]
# try some text
Set Variable [ $r ; Value: MBS( "JS.SetGlobalProperty"; $JS; "v3"; "\"test\"" ) ]
Set Variable [ $v3 ; Value: MBS( "JS.GetGlobalProperty"; $JS; "v3") ]
# show results
Show Custom Dialog [ "Property" ; $v1 & ¶ & $v2 & ¶ & $v3 ]
Set Variable [ $r ; Value: MBS( "JS.Release"; $JS ) ]
See also
Example Databases
Blog Entries
Created 7th December 2019, last changed 29th October 2020
JS.EvaluateToString - JS.GetGlobalPropertyValue
Feedback: Report problem or ask question.
Links
MBS FileMaker blog