With the release of FileMaker 19 we get much better integration between File
So with the increasing interest and popularity of embedding HTML/JavaScript widgets and features, we now find ourself in need of a good method to include the JS, CSS and other files within our solutions.
Multiple fields could work, but that adds to schema and it takes time.
You could use text objects, but then you are dependent on layouts and context.
And if you load them into global variables, you find yourself with a really slow data viewer, which you might need for other stuff.
Using the InsertText script step is a nice way to get text like the content of a JS or CSS file into a variable.
However, if you try to paste the content of such files into the dialog, you will get a FileMaker error saying that there is a limit of 30.000 characters.
The great thing is that this limit only apply to the dialog chrome – not the actual script step.
Now we just need to find a way to get our file content into the script step.
This is where this tool will help you.
Simply paste the content into the field, click the button and write the variable name you want to target.
Now the script step is on your clipboard and ready to paste into the script in your solution.
Simple, right ?
And now you have everything you need in the script, which makes your code more portable.
If you also targeted a local variable, your data viewer is not dying from the content.
Multiple fields could work, but that adds to schema and it takes time.
You could use text objects, but then you are dependent on layouts and context.
And if you load them into global variables, you find yourself with a really slow data viewer, which you might need for other stuff.
Using the InsertText script step is a nice way to get text like the content of a JS or CSS file into a variable.
However, if you try to paste the content of such files into the dialog, you will get a FileMaker error saying that there is a limit of 30.000 characters.
The great thing is that this limit only apply to the dialog chrome – not the actual script step.
Now we just need to find a way to get our file content into the script step.
This is where this tool will help you.
Simply paste the content into the field, click the button and write the variable name you want to target.
Now the script step is on your clipboard and ready to paste into the script in your solution.
Simple, right ?
And now you have everything you need in the script, which makes your code more portable.
If you also targeted a local variable, your data viewer is not dying from the content.
We hope you like this little tool – which is completely open.
Please provide your name and email address for your free* download.
Free means “Yes please, I´d like to receive up to four mails a year
with relevant information about TheBrainBasket universe.”
Distributed as-is; no warranty is given.Use of the material is at your own responsibility. If you use techniques from our solutions, you are welcome to credit DataManix (optional of course).
Free means “Yes please, I´d like to receive up to four mails a year with relevant information about TheBrainBasket universe.”
Your information stays with us!
Free means “Yes please, I´d like to receive up to four mails a year with relevant information about TheBrainBasket universe.”
Your information stays with us!
Get Download Link
This code is beerware; if you see me (or any other DataManix employee) at the local, and you’ve found our code helpful, please buy us a round!
Distributed as-is; no warranty is given.Use of the material is at your own responsibility. If you use techniques from our solutions, you are welcome to credit DataManix (optional of course).
Is this only for FileMaker 19? I tried this tool several times and it appears to put the script step into my clipboard correctly when using FileMaker 18. The script will also paste into filemaker 18 Script Workspace. Somehow it seems to fail after I execute the script step on version 18 but I can’t figure out why…
Hi Charles
The tool creates a script step in FileMaker’s XML format and place it on the FileMaker pasteboard, so you can paste into your script.
This format has been around for a long time, so it should be compatible several versions back.
However, using the variable name as a target is a feature that came in – I think it was FM17.
If you script fails after you have pasted it, it could be that the content you try to put into the step, has some hidden chars, that we didn’t account for. However, if you find the culprit you can enhance the tool with a better substitution of characters, that don’t fit well in XML.
If you do, please share your findings here, so others can benefit from them.