Pensive Programmer Posted January 24, 2008 Share Posted January 24, 2008 Here's my question: In a given layout, I have two different portals that lead to two different modules; let's say the first one returns the field First Name and the second portal returns the field Last Name from a different module. When I line the two portals up in my layout side by side, I want the names to appear on the requisite line i.e. the correct first name and the correct last name line up. Instead, the portal defaults to listing the names in alpha order which scrambles the names. By way of example, the names are Arthur Waxman and Betty Smith. Portal 1 returns the list: ARTHUR BETTY Portal 2 returns the list: SMITH WAXMAN Is there a way to alter the default ordering of a portal, and if so, what kind of relationship do I need to build in order to get the names to appear in the right order? With the current lists, it will appear that Arthur''s last name is Smith when the two portals are placed side by side. I need Module 1 to somehow know that Arthur goes with Waxman and that they should be displayed side by side. Thanks much. Quote Link to comment Share on other sites More sharing options...
AHunter3 Posted January 25, 2008 Share Posted January 25, 2008 What do you mean by "module" and why do you have one portal for first name and one portal for last name? Why aren't your first name and last name fields going into the same record, and therefore on the same portal row of the same portal? As for portal ordering, unless you alphabetized either the portal or the relationship OF the portal, the order they display is the order in which you input the data. Quote Link to comment Share on other sites More sharing options...
Pensive Programmer Posted January 25, 2008 Author Share Posted January 25, 2008 Apologies for 'Module'. That's office speak for 'database'. I actually used names as an example. The actual data is this: In the database SONG TITLE i have a portal that leads to database SONGWRITER and a portal that leads to database SONGWRITER'S COMPANY NAME. So for the record MARY HAD A LITTLE LAMB in SONG TITLE, my first portal tells me that the two SONGWRITERS are John Smith and Amy Adams. The second portal tells me that John's COMPANY NAME is Happysong and Amy's COMPANY NAME is Bigwig. I need John Smith to line up with Happysong and Amy Adams to line up with Bigwig, regardless of the order in which they were entered into the 2 portals (years of data entry have given me thousands of records which could not reasonably be re-entered with this request in mind). I realize I'm working in an old version of the software, but our upgrade is still a ways off so I have to make due. Any suggestions? thanks. :-) Quote Link to comment Share on other sites More sharing options...
AHunter3 Posted January 25, 2008 Share Posted January 25, 2008 That clarifies things substantially. You're still using the wrong structure. The company is not the company of the song, it's the compay of the songwriter. So while you do indeed want 3 tables, you want to have a relationship between songwriter and company, such that from your portal row contianing the name John Smith you can click a dropdown value list and have all the companies already in the system pop down for you to pick from; and if it's a company you have not put into the system yet, you enter the name of the company in a global text field, let's call it g.NewCompany and then you click a button which runs a script that does something like New Window ["Temporary Window"] Go to Layout ["Companies Data Entry"] New Record/Request Set Field [Companies::Company Name, TableYouStartedFrom::g.NewCompany] Set Variable [$Company Serial, Companies::Serial Number] Close Window ["Temporary Window"] Set Field [PortalToSongWriters::SelectedCompanyID, $Company Serial] (Actually you'll probably want to enter more about the new company than just its name? If so, it might make more sense to ditch the global-field business and have the new window stay open while you enter all the company info, then when you are done you close that window, go back to Amy Smith's record and pick the associated company from the dropdown value list.) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.