hexxabubba Posted November 10, 2007 Posted November 10, 2007 List(Function)gives me a list of line items; which is great. But I need for that list to be in alpha order, instead of order of portal. Is there a calculation that will do that? I couldn't find a link. Thanks in Advance!
Søren Dyhr Posted November 10, 2007 Posted November 10, 2007 You could use: http://www.filemaker.com/help/Functions%20Ref45.html ...provided you take care of the freshing issues it exhibit, when used in scripts is it smooth sailing, with unstored calc'fields is it a mixed pleasure ...stored calc'field is it not working reliable. Alternatively could you since you're on 8.5 Advanced, define a CF to deal with the output from List( http://www.briandunning.com/cf/26 But again is freshing issues making it tough to use a calc'field for say primary key of a relation. Plus there is a price to pay speedwise when you whirl it thru the CF. The fastes of them all are probably to use both functions mentioned here and Filtervalues( http://www.filemaker.com/help/FunctionsRef-346.html Since the stuff will sort according the ValueListItems( but where ValueItems not are dealing with the found set but all via a cartesian relation. --sd
comment Posted November 10, 2007 Posted November 10, 2007 The List() function lists values in the sort order defined for the relationship - not the portal. So you could sort your relationship alphabetically, and define a separate sort order for your portal. Alternatively, you could define a value list of related items and use the ValueListItems() function instead. Note that this will also remove any duplicates.
Søren Dyhr Posted November 10, 2007 Posted November 10, 2007 Comment kind of say, what I'm after but forgot for a short while ... I think?? Solve the matter as long as posible via flexing the relational definition, then you might later follow up on the matter with calc'functions ... never the opposite way ... although spreadsheet'ish discourse might have made you used to it that way! --sd
hexxabubba Posted November 10, 2007 Author Posted November 10, 2007 I used the Bubble Sort Function and it works. Thank you for your help! I must have a problem with the iterations.When I use the calculation to change from carriage return to comma seperated Case(IsEmpty(my_bubble_sortfield); ""; Substitute (my_bubble_sortfield ; "¶" ; ", " )) I get a comma at the end of the last value in some results. I have the iteration set to 10 ( the amount of portal rows) BubbleSort (line_item_list ;10 )Am I setting the iteration wrong? When it was at "1" it would not sort list. Any help would be greatly appreciatted.
comment Posted November 10, 2007 Posted November 10, 2007 I am puzzled why you would choose a method that is both the slowest and the most costly to implement out of the suggested alternatives.
Søren Dyhr Posted November 10, 2007 Posted November 10, 2007 Yes, do us the favour an make an extra TO to where the relation is sorted! Anything else is crossing the river, to get water! --sd
comment Posted November 10, 2007 Posted November 10, 2007 Why would you need an extra TO? All it takes is two trips to the sort order window - once for the (existing) relationship, once for the portal.
Søren Dyhr Posted November 10, 2007 Posted November 10, 2007 Good point! I'm not getting there today somehow?? --sd
Recommended Posts
This topic is 6283 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