trmupstage Posted November 12, 2007 Share Posted November 12, 2007 Hi, I have an issue where sorting does not appear to work, either as a script or manually. Let me explain. I have an inventory table, line item table and a purchase order table. The purchase order layout has a portal to the line item table. The relationship from purchase orders to line items and inventory to line items works fine. I can add parts to the purchase order and adjust stock with the purchase orders. In the purchase order layout, I want to create buttons on the labels above the portal to sort the portal records by the label. Seems simple enough, but I can't get it to sort. Even if I go to sort, select the LineItem::Description field as the sort to field, select ascending, and press sort; nothing happens. Well, I take that back. The screen does "blip", but the sort doesn't happen. I must be missing something obvious, but I can't think what it might be. Help... Link to comment Share on other sites More sharing options...
bcooney Posted November 13, 2007 Share Posted November 13, 2007 Go to http://www.databasepros.com and click on Resources. Search for portal sort. There are several techniques. Link to comment Share on other sites More sharing options...
trmupstage Posted November 13, 2007 Author Share Posted November 13, 2007 Thanks for the link. I found an article and example on there. From reviewing the example file, I see that it is not as straight forward as I thought it would be. The example I found uses a calculation in the sort setup of the portal. I was thinking that maybe there was a simple script. Possibly not. I'll keep searching. Link to comment Share on other sites More sharing options...
Vaughan Posted November 13, 2007 Share Posted November 13, 2007 "I was thinking that maybe there was a simple script. Possibly not. I'll keep searching." Sure, keep searching... but you won't find a "simple script" to do it because you need to change the sort order of the *relationship* to change the sort order of the records in the portal. Barbara posted a link to one of the simplest methods (even if it looks complicated). Another method is to use tab controls to switch between tabs, where each tab has a portal with the required sort order defined. Or use multiple layouts instead of tabs. Link to comment Share on other sites More sharing options...
comment Posted November 13, 2007 Share Posted November 13, 2007 Barbara posted a link to one of the simplest methods (even if it looks complicated). Another method is to use tab controls to switch between tabs, where each tab has a portal with the required sort order defined. I don't see a link to any specific method. AFAIK, the ONLY simple method is to use multiple portals in a tab control. It is also the fastest. Any calculated approach has to deal with different data types - and that's anything but simple. Link to comment Share on other sites More sharing options...
trmupstage Posted November 13, 2007 Author Share Posted November 13, 2007 "I was thinking that maybe there was a simple script. Possibly not. I'll keep searching." Sure, keep searching... but you won't find a "simple script" to do it because you need to change the sort order of the *relationship* to change the sort order of the records in the portal. Barbara posted a link to one of the simplest methods (even if it looks complicated). Another method is to use tab controls to switch between tabs, where each tab has a portal with the required sort order defined. Or use multiple layouts instead of tabs. Sorry, I didn't mean to imply that I was getting a poor solution from Barbara. I am grateful for all the help I'm getting. There have been a few things in FM that I think must be easier to do than they appear. It's not that they are overly complicated, it's just that I wasn't understanding some of the structures used in FM well enough. Once I finally get the principal down, it all comes much easier. Thanks again for the help. Link to comment Share on other sites More sharing options...
bcooney Posted November 16, 2007 Share Posted November 16, 2007 I thought I had linked to JMO's portal sort solutions. He had several. I see that you can't link to a page, so go to Resources and search on Portal Sorts. I don't think you change the relationship sort, Vaughan, just the contents of the field that the portal is sorting. So, the portal always sorts by SortFieldAsc then SortFieldDesc, and via script, you populate those fields. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6133 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