klauern Posted July 12, 2004 Posted July 12, 2004 I have what seems to me an easy solution. However I, for some reason or another, can't figure it out. I'm trying to jump from one file to another. I have one file, Tickets.fp5, which has ticket information for customers, etc., and another, "Computers.fp5" which stores the users' computer information. I want to make a button work so that I can switch between these files. Specifically, when this specific button is pressed when browsing a specific record in "Tickets.fp5", I would like it to perform a search all records for the specific computer/s that match this user's customerID in "Computers.fp5". When this button is clicked, it switches to a view layout in "Computers.fp5", THEN performs the search. I can't figure out how to search in computers.fp5 for the information that is in tickets.fp5 to find the computer/s that match the user to whichever ticket i'm browsing. If that seems a little complicated, let me know, so I can better reply.
-Queue- Posted July 12, 2004 Posted July 12, 2004 Assuming you have a relationship, rel, from Tickets to Computers based on the CustomerID field, your script in Tickets should be like: If [not IsEmpty(rel::serial)] Go to Related Record [show only related, rel] Perform Script [external] <-- call View script in Computers End If The external View script in Computers would simply Go to Layout [the layout you want to view].
QuinTech Posted July 12, 2004 Posted July 12, 2004 Hi klauern. I'll first mention that, from what you've described, you could more easily achieve this reslt through a portal based off a relationship from Tickets::customerID to Computers::customerID. But if you really do need to perform a find in Computers.fp5, you're on the right track with globals. This takes advantage of an exploit i recently learned of on this forum wherein any global-to-global relationship is always valid, regardless of the contents of the globals. There are those who will say you shouldn't use this technique, and they may be right; i have no opinion on this. But this should work for your situation. Create a global in Tickets.fp5 called tempCustomerID. Also create a global (any global will do) in Computers.fp5. Make a relationship from Computers::global to Tickets::tempCustomerID. In Tickets, create a script with two steps: Set Field ( tempCustomerID , "customerID" ) Perform Script (External Script, Computers.fp5 "Perform Find from Tickets.fp5" ) In Computers.fp5, you will have another script names "Perform Find from Tickets.fp5" with the following steps: Enter Find Mode Set Field ( customerID , "Tickets::tempCustomerID" ) Perform Find This should do what you're looking for. Jerry
Recommended Posts
This topic is 7700 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