cookie
Use cookies to set data in the user's browser that can persist between sessions. The cookie
action allows for setting values into a cookie, and you can use a JavaScript function to retrieve the data back later.
Cookie values can also be retrieved in your FileMaker scripts. They are stored as a JSON object in the $$BF_State variable: JSONGetElement ( $$BF_State ; "params.handshake.headers.cookie" )
Options
Options Key | Type | Description |
---|---|---|
| string | Options: |
| number or object | If number, the number of days before the cookie expires, If object see additional notes |
| string | Cookie name |
| string | Cookie value |
To remove a cookie simply set the daysOrOptions
value to 0
Examples
There is no built-in custom function at this time. If you want to set a cookie from a FileMaker script, use the BF_SetAction_Function action with the functions above.
Cookies that you set in a browser are will persist for every page in your site (until they expire) and are sent with every hook script back to your FileMaker server. Be careful not to store too much data in cookies as this can impact your site's performance.
For more on reducing the payload that is sent to your FileMaker server, see this page.
Additional Reference:
This action is based on the following Vue modules:
Last updated