I look for a script step to copy a text to the clipboard without the requirement of a field on the layout.
The text parameter should be a calculation, allowing to pass constant values, a combination of fields, or any other type of calculation.
Just setting a local or global variable is not sufficient?
Will someone share an actual use case where Copy/Paste is the only viable scripting option?
I've been doing this a long time and have never had to use Copy/Paste in a script.
I would think that a better suggestion would be for copy/paste script steps to use a memory space that is NOT the OS clipboard but is a mem space totally reserved for FM only.
When interoperating with other tasks or applications, users expect to be able to copy and paste.
In a list of contacts, I might give the end user a button (or a menu), to allow them to copy a contact's address or vCard so that they can paste it into the email they are composing.
You can already use plugins for this, e.g. Clipboard functions here.
Yes … (I was thinking about adding MBS as an example how plugins are doing it) …
or I could drop FileMaker and use a different program. But in the end I thought, I post an idea how to improve FileMaker.
I suggest, FileMaker Inc. should hire you as a consultant, so you can teach them, how to implement awesome functionality into their product. ;-)
Can you tell me why the requirement of not having a field on the layout? You can always hide the field and the Copy script step will still work.
Just for fun:
You should send in a "Product Idea": Buy Monkeybread Software GmbH and hire Christian Schmitz as consultant to the FMI Development Dept.
You wanna bet on how many votes you'll get?
The idea is to use this feature in many various scripts without need of editing any layouts at all.
Always look for a most modular and versatile approach.
If the script step requires a specific field, I have to write a new script or add a if-else if- else - … structure for every case in my database. But I prefer to write one script that uses parameters to work in different environment. It would also be easier to copy the script between databases without getting broken.
If FileMaker wants to play with the big guys, it should provide a programming language or follow a more general approach than providing specific solutions that will work only in a very limited environment.
In the current form the script step requires a specific table with a certain name, a specific field in that table with a specific name and a specific data type. But the field actual acts only as a temporary data container.
With "Do AppleScript" > Calculated: (and replace $my_var to whatever you want) you can do that.:
"set the clipboard to \"" &
Many of my clients use Windows computers. What command could I use for them?
arnoldkegebein wrote: Many of my clients use Windows computers. What command could I use for them?
MBS( "Clipboard.SetText"; "Hello World" )
Have a look at this discussion: Windows Clipboard CF
So the major difference in your Product Idea, outside of what can be done now, has to do with a combination of fields.
Right now, adding a field off the right side of the layout, you can do the following:
Go to Object [ Object Name: "copy_field" ]Copy [ Select ] // no Go to target field option set.
Go to Object [ Object Name: "copy_field" ]
Copy [ Select ] // no Go to target field option set.
Any field you add off the side of the layout and give it an object name of "copy_field", will grab the value of that field and put it on the clipboard. The other approaches mentioned above also can be viable.
All you need now is the script, and a field with that object name, and it will work anywhere.
- To use Database Fields for a "copy to clipbord" function is a typical FileMaker work around. I don´t like this solution.
- "Many of my clients use Windows computers. What command could I use for them?" : Good point!
- The MBS Solution: Externals should be used carefully. The day will come and you have to recode because the command is contained in FileMaker and the external is no longer provide it or the external is no longer maintained.
My suggestion: Good request, a basic clipboard command should be provided by FileMaker.
Retrieving data ...