geekay46 Posted September 5, 2012 Posted September 5, 2012 Good morning. I have a large filemaker file which works around a customer database. I wish to call a second database from my customer table but have the ability to transfer the customer name to the new database so that it selects the correct record. I have tried writing the customer name to a global variable and the opening the second database but the value in the variable is lost. Is there anyway in which this can be done. Cheers - Graham
bcooney Posted September 5, 2012 Posted September 5, 2012 Your terminology is a bit off...Sounds like you have two files, and you wish to relate by Customer. However, you should use a unique ID for the customer, not the name. What if you have two customers with the same name? The other question I have, is why two files? Why not two tables in the same file? Anyway, you can "send" the CustomerID to the other file's script using a script parameter.
geekay46 Posted September 6, 2012 Author Posted September 6, 2012 Hi bcooney. Thanks for that. Yes I was being a bit general, I intend the link to be by a unique customer number. I shall give that a try in the script that calls the second file. The reason that there are 2 files is that they already exist, albeit the second file is at present not set up with customer detail, that is what I am trying to correct.
bcooney Posted September 6, 2012 Posted September 6, 2012 Consider merging the files into one file with multiple tables.
Matthew F Posted September 6, 2012 Posted September 6, 2012 Merging the two files into one would allow you to use the "Go to Related Record" script step to skip from one table to the next. If you have two separate files, then this step won't work. Instead you can use the "Perform Script" step to call an external subscript in the related file, and pass the customer ID as a script parameter. The subscript in the second file would then go to your layout of choice and perform a Find using the script parameter.
Rick Whitelaw Posted September 6, 2012 Posted September 6, 2012 Matthew, A related record can be in any related table including tables in another file. It makes no difference as long as the external file references are proper. So GTTR works anyway. RW.
Recommended Posts
This topic is 4459 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