Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Recommended Posts

Question: Is there any way to create a sorted result in this situation?


I want to create a report with names listed in alphabetical order in sentence form rather than the list form that a portal produces (so far as I know). After some investigation I found that GetNthRecord will create a calculated field that has what I want when I use the following structure:


GetNthRecord ( Students::Display Student Name;1) &

If (EvaluationError( GetNthRecord ( Students::Last Name;2));""; "; " & GetNthRecord ( Students::Display Student Name; 2)) &

If (EvaluationError( GetNthRecord ( Students::Last Name;3));""; "; " & GetNthRecord ( Students::Display Student Name; 3)) &

If (EvaluationError( GetNthRecord ( Students::Last Name;4));""; "; " & GetNthRecord ( Students::Display Student Name; 4))


It works very nicely to produce the following field contents:

Rikki Moore; Adam Naar; Albert Parker; Marko Durica


What this approach does not do is sort the names in alphabetical order as would be desirable, even if the source table is sorted that way. I believe what's happening is that FM is pulling the records essentially in entry order.

Link to comment
Share on other sites

The easiest way is to create the relationship, sort it as desired, and create a calculation field:


~list = List(Students::Display Student Name);
Substitute(~list; "¶"; "; ")

Note that it is the relationship that must be sorted, not the source table.

Link to comment
Share on other sites

This approach is far more elegant. Thanks.


I'd never used sorting a relationship before either. Quite splendid.

Link to comment
Share on other sites


  • Create New...

Important Information

Terms of Use