If you copy and paste a record from Bento into a word processor, what do you get? Do you get a set of values separated by tab characters?
If so, it would be possible to paste a record into a text field and a script could parse the data thus pasted into the designated fields of a new record.
Thanks for the reply.
If you paste it into a word processor, yes it should be CSV. I can give it a try, thanks. Just seems silly that Bento, a program made by FileMaker, can't copy/paste data into FileMaker, that's just lame.
I didn't suggest csv, (comma separated values) , but to see if the result consists of tab separated values. As long as there is a clearly identifiable delmitter between the values, the code to parse the pasted data shouldn't be too terribly complex. One trick is to use Subsitute to change the delimitter character into a return and then you can use GetValue to extract different values from the resulting list of return separated values--but only if no returns are included in the pasted data.
Wow, I'm thinking I need to look into a new line of work. That sounds waaaay complicated. Thanks though, sounds like you know your stuff. Maybe in a few months I'll be able to figure it out.
Maybe in a few months I'll be able to figure it out.
Or you can get help right here. That's what this forum is all about after all...
What character separates the values when you paste the data?
Sorry, I didn't mean it that way.. I meant that maybe in a few months of playing with FileMaker, I'd be able to understand all of what you said. I'm still very new to this stuff. I just tried it, and it looks like they are tab separated.
Let's say you define a text field. Name it: PastedData.
Use Manage | Scripts to create this script:
Set variable [$Values ; Substitute ( YourTable::PastedData ; Char ( 9 ) ; ¶ ) ]
Set Field [YourTable::firstField ; Getvalue ( $Values ; 1 ) ]
Set Field [YourTable::2ndField ; Getvalue ( $Values ; 2 ) ]
Set Field [YourTable::3rdField ; Getvalue ( $Values ; 3 ) ]
and so forth...
Any script steps or functions that are unfamiliar to you in this example, you can look up in help to learn more.
Char(9) returns the tab character. ¶ represents a carriage return and you can click a button in the Specify Calculation dialog to add it to an expression like I have here. The subsitute function is turning tabs into returns so that the GetValue function can successfully extract one value at a time from the text that you pasted into the field.
You can use a button next to the filed to perform this script or an OnObjectModify trigger can perform this script each time you paste data into the field.
Please note that you can also use Import Records to import data from Bento instead of copy/pasting it a record at a time.
I really appreciate the time and effort you've put into replying to my post, Phil. (can I call you Phil?)
I am aware that you can import Bento db's directly into FileMaker. The reason I want to be able to copy and paste, is because I kind of started the transitional process the wrong way; I imported my Bento db into FileMaker, and then started editing and redesigning the layout of everything. At the same time, I still need to keep the old Bento db updated because that's what our staff members use to access the db currently.
I was really hoping (actually I assumed because it's made by the same company) that you would be able to copy/paste the data from one to the other, like copying an image from Adobe Illustrator and pasting it into Adobe Photoshop. To say that I'm disappointed that it DOESN'T do that would be an understatement. But I digress..
So right now, it seems like I'm going to have to familiarize myself with FileMaker over the next couple of months, and then when I'm ready, I'll just import the latest Bento data into FileMaker, redesign all my stuff, and then I should be good.
I was just hoping to build a shell or framework that I could throw data into at a later time and it would all just fall in place.