NickS Posted February 23, 2005 Posted February 23, 2005 I know this should be simple but I can not seem to get it. I have DB of customers and a portal that displays related jobs. In the jobs DB I have an auto number field set up. From the customers DB I have a button that takes me to the related record in the jobs DB. I would like to go to the related record from the customers to the Jobs DB and go to the most recently created record, yet showing all records. Any suggestions?
aaa Posted February 23, 2005 Posted February 23, 2005 You can create a portal on your relationship in Customers file.
RalphL Posted February 23, 2005 Posted February 23, 2005 Put the button in the portal and GTRR will take you to that record. Not sure what you mean by showing all records. Do you want all records for the customer or all records in the table? If the first use the Show option. You will have to add a script step to take you to the last record.
LaRetta Posted February 23, 2005 Posted February 23, 2005 You don't even need the button in the row, if I understand your request. The button can be above the portal, because all records in the portal are related to that specific customer. A script of: Go To Related Records { do not click 'Show Only Related' ] Go To Record/Request/Page [ Last ] This will provide the related set to that customer and place you on the last related record created. Your most recently created jobs record will always be your last - if it is unsorted. LaRetta
NickS Posted February 23, 2005 Author Posted February 23, 2005 I used your script but for some reason, even though I have Last set on the GTR, I am still ending up at the first record created in the found set. I do thank every one for your help. Just to clarify my goal is to go to the most recent related record but still show entire table or all records. Nick
RalphL Posted February 23, 2005 Posted February 23, 2005 I just tested the following script: Go To Related Records [ Show Only Related Records ] Go To Record/Request/Page [ Last ] It found the related records and went to the last one as it should.
comment Posted February 23, 2005 Posted February 23, 2005 If I understand you correctly (and that's a big IF), you want (a) to see all the records in the JOBS table, whether related to this Customer or not, and ( to land on the most recent record for this Customer. Try this: In the definition of the relationship, click "Sort records" and create a sort order by Date, descending (or Record ID, descending - whatever it takes to make the most recent record to be the first one in the sort order). You can to set a different sort order for the portal, if you like. Now the script is simply: Go To Related Record [ ] // do NOT check 'Show only related records' Put the button anywhere OUTSIDE the portal. BTW, with a one-liner like this you don't even need a script - you can do this directly in the button definition.
bikergeek Posted February 24, 2005 Posted February 24, 2005 Check the portal format and uncheck "Sort portal records".
Recommended Posts
This topic is 7215 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