-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Dear, makers of this really smart gem!
Could it be possible to implement a new feature?
Altough your gem is made to deal with records, it could be the a fine tool to call FileMaker-Scripts on the FileMaker-Server and get the results back?
I know, like many things in FileMaker, this would be a fairish hack, but a great help for many cases.
Situation:
In near Future, it may be that with the restFM-Interface, the dealing with Scripts would become easier, but there are a lot of older versions running and there are reasons to maintain a older Version and don't update.
Examples: In File-Maker its common to rename Fields. If you have a big system with a lot fo xml-Interfaces and a 100% FileMaker-Developer in the team or the chief of the company also develops in the System, you can tell them 100 times that it's not allowed to rename Fields - you will have a problem.
If you want to push larger texts to a older FileMaker, it can not receive by 'put', so it blocks. You have to call a FileMaker-Script, which gets it by 'get'.
This are only two examples - there are more reasons.
To call a FileMaker-Script over the XML - Interface, you have to call a layout, and then you can call a script see: XML-Interface (url: "..&-script="). This is the easier part.
More complex is to deliver back the result over the xml-interface:
You have to call the Script by ".prefind", then give a UID with the parameter, the FileMaker-Script does his work, creates a record with this uid and the result, and in the same step, the XML - Interface finds and picks up this record and delivers it back within the xml - result. Yes, sorry, this is a real Hack!! But, this steps could be implemented once in this gem and given a description or a example for the FileMaker-Side. I've written such a logic in Xojo for interacting with FileMaker and it works very stable and also on the older FileMaker-versions.
If this FileMaker-Script runs with full privileges, it is then able to do anything on the FileMaker-Side, also on other layouts and Tables.
Problem: give Script-Parameters to FileMaker
In the XML - interface, FileMaker can only receive a single Script-Parameter in one string.
Since FileMaker-16, fileMaker can deal with json. To have Json-Ability on older Versions you can install Base-Elements on FileMaker-Server. A other way to give FileMaker multiple Script-Parameters is to deal with Custom-Functions. One Example, i've written, i've attached.
If you or we can implement this new Feature to this gem, i could deliver the counterpart as a example-FileMaker-File and we could deliver this with your gem.
Many thanks and best Regards in advance,
chmich