carlosnorvik Posted May 30, 2013 Posted May 30, 2013 Hi: I have 4 clone files, managing inventory, invoicing, ordering, etc. They are used by companies in 4 different cuntries, each one slightly tweaked to suit country specific regulations. I want to do unify value lists, scripts and so on, so that whenever possible I only have to modify one file to make changes that work in all files. I started doing this today with a new feature, involving technical part drawings, so that you can access the drawing when ordering a part (via a button on the line of the portal corresponding to the item). I use similar macros with no problem inside a single file, but can't get it to work with this new file, it does not perform the find on the second file. it opens the second file but "stays" on the first one for the find procedure. Here is a macro (for finding) that works inside the same file, it allows me to see the buy/sell record list for any item, 1 file involved: Copy[select; PlazaDetailPedio::codecrip] Enter Browse Mode[] Go to Layout["Producto"(PlazaProd)] Go to Field [PlazaProd::codecrip] Entre Find Mode [] Paste[select] Perform Find[] And here is the one I cannot get to work (2 files involved) Copy[select; PlazaDetailPedio::HOB] Open File ["hobs"] Entre Browse Mode[] =====Go to Layout not available for the second file (or I could not figure it out)====== Go to Field [hobs::hobnr] Entre Find Mode [] Paste[select] Perform Find[] Any suggestions are welcome. Thanks Carlos Forgot to mention: Files hosted on File Maker Server 11, client File Maker Advanced 11 on wndows
carlosnorvik Posted May 31, 2013 Author Posted May 31, 2013 I have the problem half solved, I still have to find out how to open the second file without triggering the script and how to make the script work when the second file is open. Any help to solve this is welcome! I use one script for each file File one script: Copy[select; PlazaDetailPedido::HOB] Enter Browse Mode[] Open File ["hobs"] File 2 script trigger on enter layout Enter Find Mode[] Go to Field [hobs::hobnr] Paste[select] Perform Find [] Regards Carlos
carlosnorvik Posted June 2, 2013 Author Posted June 2, 2013 Just thought of a much easier way to do it, load the images to the web and make a simple Open URL script to see them when needed.
Rick Whitelaw Posted June 2, 2013 Posted June 2, 2013 Should you decide to call a script in file 2 via a script in file 1 I would advise against using copy and paste. Create a variable in file one and pass it as a script parameter to script in file 2.
carlosnorvik Posted June 4, 2013 Author Posted June 4, 2013 OK, I learned a new one, I did not know that option existed, thanks. I have never really read any FM books, so I probably miss more that a few funtions in my toolbox. I have a few scripts using copy/paste to do finds (same file scripts), 99% of the time, they work, but sometimes the they don't. Would it be worthwhile converting all of them to Variables? Thanks Carlos
Lee Smith Posted June 4, 2013 Posted June 4, 2013 Hi Carlos, Copy and paste have two major issues and there are better ways than to use them. 1. Both fields have to be on the current layouts 2. Using a user's clipboard can screw up the user by removing something they are expecting to be there in the future. Using Set Field, and Set Variable is a better approach and neither require the fields to be on the layout or effect the clipboard. I have never really read any FM books, so I probably miss more that a few funtions in my toolbox. Although FileMaker has a reputation for being easy to learn and use, it still has a learning curve. Being a member of this list can help you in that endeavor, but do yourself a favor and explore the other resources, such as those you will find in the Resource Topic Area and techniques that are available at some of the sites of the advertisers that help support this Forum.
carlosnorvik Posted June 4, 2013 Author Posted June 4, 2013 Thanks, that will help improve some of my databases. Have a great week Carlos
carlosnorvik Posted September 6, 2013 Author Posted September 6, 2013 Hi Lee: Already changed some from copy/paste to set field. Works much better, thanks
carlosnorvik Posted December 4, 2013 Author Posted December 4, 2013 Hi again Lee Finally I have changed all my copy/paste to " Set", it is a great improvement Thanks again. Carlos
Recommended Posts
This topic is 4350 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 accountSign in
Already have an account? Sign in here.
Sign In Now