Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Script #13

Open
rivetopia opened this issue May 22, 2020 · 4 comments
Open

Run Script #13

rivetopia opened this issue May 22, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@rivetopia
Copy link

rivetopia commented May 22, 2020

Is it possible to run a script on its own (outside of a find) and have the script results returned?

@thyyppa
Copy link
Owner

thyyppa commented May 26, 2020

I haven't actually used the script functionality in my day-to-day, so I'm not 100% sure what filemaker will return, but I can take a look this week.

Could you give a simplified example of what you'd like to do? Particularly an example of the script you'd be running in filemaker and what you'd like it to return. Just to help me with building this feature out. :)

@thyyppa thyyppa added the enhancement New feature or request label May 26, 2020
@thyyppa thyyppa self-assigned this May 26, 2020
@rivetopia
Copy link
Author

regarding issue : I meant to post it under laravel-fluent-fm let me know if I should open it up there instead.


Last line of my scripts are typically an Exit Script step, with a json object in the text result.
... Exit Script [ Text Result: $myjson ]

If I call that script via api
https://{{server}}/fmi/data/v1/databases/{{db}}/layouts/{{layout}}/script/{{script}}?script.param={{param}}

The api result will have the Exit Script text in response.scriptResult
{ "response": { "scriptResult": "myjsonString", "scriptError": "0" }, "messages": [ { "code": "0", "message": "OK" } ] }

so the scriptResult is what I am ultimately looking for.

Hope that helps, thanks for having a look.

@thyyppa
Copy link
Owner

thyyppa commented May 27, 2020

Either project works, this one is where the guts live, the other is basically just a facade and a service provider.

That actually helps a ton, thank you. Expanding out the script calls will add a lot to this project. I'll try to get to work on this sometime this week.

@base64bits
Copy link

Not sure if it too late, but running a script on its own is only available on FMS 18+, something like:
if ($this->fmversion < 18) return $this->throwRestError (-1, "This function is not supported in FileMaker 17");

May help if not already implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants