Calling JS Functions from Filemaker

When in dev mode the WebViewer simply contains the localhost:1234 url, so that means in dev mode you cannot cause JS to run a function unless you create a button click-event which can manually trigger the function. I did not realise that would be a limitation unless you know of a workaround.

However when in Deployment mode the WebViewer will then contain the entire Parcel’d up ..dist/index.html. So it should be possible when in deployment mode to run JS functions using the ‘Perform Javascript in Web Viewer” script step.

Since my widget depends upon JS functions called by FM, I am looking for work arounds, and using deployment mode seems to be the best bet.

I am getting record lock problems when running the ‘npm run deploy-to-fm’ - fm cannot seem to read the ../dist/index.html file. If that could be made to work adding that extra npm step in my workflow is desirable on two fronts 1) Its much faster than copy/paste html into a script, 2) The packing up of multiple modules/files with parcel is also very useful allowing multiple file development in VS-Code

If my workflow always includes the deploy step - I will still enjoy a far better streamlined workflow.

JS-IN Fm is a real productivity boost especially when styling in css.