user3157674
user3157674

Reputation: 65

Filemaker Script API More than One Layout

I have a script in filemaker, which takes few datapoints from a layout then go to a different layout and import them.

Currently in filemaker I can simply set the fields I want as variables then use the "Go To Layout" command, go to a different layout, then request new record, then set my new field like follows: Current Code

My problem now is when I trigger it via an API call. it doesn't allow me to go to a different layout, I keep getting Error Code 3 when I run the above code from API call:

https://localhost/fmi/data/v1/databases/DB1/layouts/TempList/script/ImportFromTemp

Is there anyway to solve this? Or is there another way to write my original script so it can achieve what I want but not using the "Go To Layout" command.

Upvotes: 0

Views: 209

Answers (2)

Josh Ormond
Josh Ormond

Reputation: 46

Check your version of FileMaker Server. I forget the exact version where this was fixed, but at some point between 18.0.1 and 18.0.4 they fixed some permission issues.

You need to check all of the security settings for the privilege set the account uses. Records, Scripts, Layouts, etc.

Upvotes: 1

Siva
Siva

Reputation: 300

Is the screenshot the complete script?

If so, you might not have enabled access to the layout for the user account you are using for Data API. Check it at File->Manage->Security->Advanced Settings->Select the Privilege Set of the data API user->Check both Records and Layouts dropdowns for the required access.

Alternatively, try Grant Full Access to the script. Right click the script name in script workspace->click Grant Full Access Privileges.

Upvotes: 2

Related Questions