![]() ![]() The files were already opened by the client that started the server-side script, or set up with an account name and password specified in the file’s File Options dialog box (FileMaker Pro only) Support script parameters and script results up to 1 million charactersĬan access other FileMaker Pro files only when both of the following are true: The server-side script can use that information in script steps like the Go to Layout script step and Perform Find script step to specify which layout and found set to act on. You can pass information about the client’s context to a server-side script by using the script parameter in the Perform Script on Server script step. As a result, server-side scripts:ĭon’t have the client’s context (current layout, found set, sort order, record, global field values, and local or global variable values) The FMSE is a client that runs each script in a separate session on the server. The Perform Script On Server script step in a script running on a clientĪ schedule (see FileMaker Server Help or FileMaker Cloud Help)Ī script started by either above method is run by the FileMaker Script Engine (FMSE), a component of FileMaker Server and FileMaker Cloud. However, you can run a script on the server (a server-side script) by using: Scripts in files hosted by FileMaker Server and FileMaker Cloud normally run on the client. Make sure in your Function Setup, you have set Min to 2 parameters, and Max to 3 parameters.About running scripts on FileMaker Server and FileMaker Cloud This function will trigger the execution of a script in FileMaker Pro with no paramater.ĮrrorResult = FMX_StartScript( &(dataVect.AtAsText(0)), &(dataVect.AtAsText(1)), kFMXT_Pause, NULL ) ĮrrorResult = -1 // This is just an example of returning an error ![]() This function will trigger the execution of a script in FileMaker Pro, passing the text as parameter to the script.ĮrrorResult = FMX_StartScript( &(dataVect.AtAsText(0)), &(dataVect.AtAsText(1)), kFMXT_Pause, &(dataVect.At(2)) ) PluginIsRunningOnClient = (FMAppVersion 2) We can then check if running on Client or server/web.įor this example, I have initialised a 'boolean pluginIsRunningOnClient ' Parm1 is a FMX_Application which is defined in the header file FMXExtern.h Step Three : Check FMAppVersion for FileMaker Application Version static FMX_Long Do_PluginInit(FMX_Short version, FMX_Application FMAppVersion ) Step Two : Modify your 'DoPluginInit' function to accept the additional parameter. GFMX_ExternCallPtr->result = Do_PluginInit(gFMX_ExternCallPtr->extnVersion, gFMX_ExternCallPtr->parm1 ) ![]() kFMXT_InitğMX_Application value App vers unicode c str* Void FMX_ENTRYPT FMExternCallProc(FMX_ExternCallPtr pb) Step One : Modify the 'case kFMXT_Init' to pass 'parm1' to your DoPluginInit function. The following steps will allow you to detect the version of FileMaker that is initialising your plugin. My preference is to not enable the functions at all (see below)ĭetect Pro, ProAdvanced, Server or Web during FMX_Init Therefore, it is important that any plugin function that shouldn't be performed with the server environment isn't available to server scripts, either by not enabling the function at all, or forcing the function to exit immediately. Not setting this flag doesn't stop the function being available to Server Side Scripts.įor all purposes, a server side script has access to the same plugin function set as FileMaker Pro / ProAdvanced Client. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |