Jump to content

How do I press "return" with a script?


This topic is 5746 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I’m new to Filemaker. I use FilemakerPro 8 on an iMacG5 OSX. I have been able to build a script that takes me to Find mode and even enters data from the clipboard into the field that I have specified. But I still need to press the “return” key on the keyboard to “execute” the find. Is there a script that accomplishes the same thing as pressing the return key? Thank you.

Link to comment
Share on other sites

I usually use my Right Hand.

Actually, if you are using a script to do this, then you can choose to run your find without dialog. It concerns me that you are using the clipboard. You should use Set Field whenever possible.

Lee

Link to comment
Share on other sites

Thanks for your prompt suggestions. I was pulled away from the computer for a bit this afternoon. The script that I am building is for locating line items. "Go to layout" then "Go to field" then "Paste" (an Invoice# that is already on the clipboard from a previous step). It does all of this just fine, but then I must press the return key to perform the find. I tried using the "Perform find" script at the very end, but it didn't work. Thanks again for your help.

Link to comment
Share on other sites

I thought I would be able to post the entire file, but that is proving to be a little risky. I've already entered lots of data like credit card numbers etc into the fields. Can you advise me as how to post the print out of the Script? Thanks.

Link to comment
Share on other sites

O.K., Daniele. Your suggestion worked. I simply added the "Perform find" that you suggested and it acted as if I had pressed the return key. I didn't even add any specifications to the step. Thanks for your help. I'll be happy to post the print out of the script steps, but I'm not sure how to do that.

Link to comment
Share on other sites

Attached (I think) is a clone of the file we have been talking about. I think the problem is solved, but any comments you might have about the scripting would be greatly appreciated. The Script that was in question is titled "Clean up". I since added "Perform Find" at the end of this script. Thank you all for your sincere help.

JDK_Main_40_Clone.fp7.zip

Link to comment
Share on other sites

As I said, you can find related items directly by using the Go to Related Record step. I also agree with Lee regarding Copy/Paste: in v.8 you have a great tool in script variables - use it.

I am rather surprised you don't have a Products table.

Link to comment
Share on other sites

Yes, I'm still learning about GTRR. When I get more time I'm going to immerse myself in it because it sounds like I'm doing things the hard way. I've had FMP for about a month and it's all a little staggering. I thought that my Line Items table was my Products table. The Line Items table lists all of the products that we make in the shop. I keep a master Line Items table in an external file then import them all back to the main database at which time I paste the Invoice # into each record imported...which means all of them. From there I enter values into the Quantity field where needed, then delete all line items whose Quantity field is empty. That gives me the found set from which to make the Print Invoice. Thanks so much for your interest.

As I said, you can find related items directly by using the Go to Related Record step. I also agree with Lee regarding Copy/Paste: in v.8 you have a great tool in script variables - use it.

I am rather surprised you don't have a Products table.

Link to comment
Share on other sites

The usual method is Customer <-> Invoice <-> LineItems <-> Products.

Products is a table of all available products (and their details, e.g. price).

LineItems are the products that a Customer actually bought on an Invoice.

When filling out an Invoice, you create a new LineItem by selecting the ProductID from a value list of all Products. The price, and other details are looked up into the LineItem from the Products table.

Link to comment
Share on other sites

Thanks for that useful tip, Comment. That along with learning GTRR is at the top of my list. We work four 10-hour shifts at my shop (Thurs-Sun) so I'll be away from this for the next few days (except for mini efforts). Thanks again so much for your help. Best regards.

Link to comment
Share on other sites

This topic is 5746 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.