Brian Dunning's FileMaker Custom Functions

GetRecordAsJSON

Gets all static fields as JSON from the current record's context

  Be the first to rate this function Log in to vote

Kyle Williams   Kyle Williams - Show more from this author
Augusto Digital
https://www.youtube.com/channel/UCpJlB7cmVNMjbjgY96MEsng

  Sample input:
GetRecordAsJSON( pk, isFormatted )
  Sample output:
JSON from current record..

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

This will use SQL to get the list of fields for the referenced table thanks to the provided pk ID. I've added an option to format the JSON or you can simply get the raw JSON.

This uses a custom function to evaluate the result for valid JSON prior to formatting it called IsValidJSON().. This could easily be swapped out with your own JSON validation function..

 

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: