Newbies justinltaylor Posted September 25, 2012 Newbies Posted September 25, 2012 Hello again filemakers, I have 2 tables one has contact data and the other has job data. They are related by a serial customer id number. I have already made a button that users can click and create a new job. Now i need to make a button that will allow them to view only the jobs for the customer they are looking at. So if i'm looking at my customer the Poop Bank, i want to have a button that will take me to the other table and display only the jobs that were made for the Poop Bank. Here's the script i have tried so far but it's not working: Go to Layout ["Billing Entry" (Billing Entry)] Set Variable [$ID; Value:Contacts::Customer ID] Enter Find Mode[] Perform Find [Restore] Exit Script [] That will pull up the correct jobs if the customer i'm looking for was the last one i created a job for. If i try to go to a different customer it will continue to pull up the same customer as with the first find. Is it not putting new data in the variable? Thanks Taylor
LaRetta Posted September 25, 2012 Posted September 25, 2012 pretty close! Grab the customer ID while still on the customer layout where the button exists... Set Variable [$ID; Value:Contacts::Customer ID] Go to Layout ["Billing Entry" (Billing Entry)] Enter Find Mode[]. <------- remove this line as unnecessary Set Error Capture [ on ] Perform Find [Restore] <----- the restore should select BillingEntry::CustomerID and put $ID as the value If [ not Get ( FoundCount ) ] Show custom dialog [ no records found ] Go to layout [ original layout ] Exit Script [] End If 1
Newbies justinltaylor Posted September 25, 2012 Author Newbies Posted September 25, 2012 Thanks LaRetta That was exactly what the problem was.
Recommended Posts
This topic is 4834 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