JSON from only the fields on a layout?

This should not be a problem, you may give it a try. From other posts in this thread I learned that the limiting factor in your case is bandwidth.

Seems like it, thanks.

Is it possible to setup an account on the remote server, then use a remote desktop connection to get in? That tends to work well in situations like yours.

I SSH into remote hosts from the command line with this config:

Host remoteServer
    # HostName    IP.V4.xx.xxx
    HostName   domain.name.here
    Port    22
    User    user_account
    LocalForward    5999    127.0.0.1:5900

You could use a dedicated app for the screen sharing if you prefer but I use the Go menu in Finder on my Mac to screen share. I type in the localhost address and port number and the remote screen pops up.

vnc://localhost:5999

The screen quality can be poor and laggy when the connection is bad. However, all the action is taking place on the remote system, so your connection can drop out without interrupting the session on the remote machine.

3 Likes

I made a custom function that builds the JSON from the fields on a layout with the while function.

JSONGetRecord : no params

JSONFormatElements (

While ( [
fields = FieldNames ( Get(FileName); Get(LayoutName) );
f = 1;
json = ""
];

f <= ValueCount ( fields );

[
n = GetValue(fields; f);
json = JSONSetElement ( json ; n; Evaluate(n) ; JSONString );
f = f + 1
];

json )

)

1 Like

Your Custom Function looks interesting.

Does it pull data from Portals? Will it put that data in an array within that particular record?

Thanks!

Hi Malcolm, thanks for the tip. I do have access to screenshare to a Mac with faster access to the server. However, I can't always access that Mac.

Thanks for this custom function. I'm assuming I run it as a script step. I successfully got all the field data on a layout into a field, and can extract individual field info. Thanks!

I have not tried portals yet.
I usually go to individual tables, find, and upload records.

Also, it probably won't handle repeating fields well.

I have demonstrated how to do this a few times during my presentations on RCC's channel.

Here is a link to my presentation of how to create a formula to get the current found set as JSON that should help:

"Dead Bird and Open Q&A - Free FileMaker Sample Files from the Viewers - YouTube"

My presentation starts at around 12 minutes into the video..

Here is a link to the demo file I created: KyleW - Demo - Create JSON From Found Set v12.zip

2 Likes

Thanks, Kyle, will check it out!

1 Like

Nice work Kyle!

1 Like