Hey, Folks - I've run into a problem I can't solve.
Background - I have a huge solution file with a full user interface used by multiple organizations.
The problem - Presently, when users are in a given module (say, "Workshops"), they click a "sort" button to pull up the FileMaker sort dialogue. Unfortunately, this gives the user thousands of fields, most of which are used for the UI and mean nothing to the end user.
The goal - I want to set it up so that when the user clicks the "sort" button, he is brought to a layout that contains 3 popups (gSortField1, gSortField2, and gSortField3) and 3 radio button sets (gSortField1AD, gSortField2AD, and gSortField3AD).
I want to have about 10 pre-determined field names that users commonly need to sort by showing in the popups. The user would be able to select:
Sort by - (gSortField1 - Select field name from popup) (gSortField1AD - Select Ascending or Descending from radio button)
Then by - (gSortField2 - Select field name from popup) (gSortField2AD - Select Ascending or Descending from radio button)
Then by - (gSortField3 - Select field name from popup) (gSortField3AD - Select Ascending or Descending from radio button)
A "sort" button would then do the tiered sort.
Unfortunately, the "Sort" script step does not allow for a calculation to determine the name of the field to be sorted.
I could program each possible sort, but that would require coding for all 10 x 2 x 10 x 2 x 10 x 2 = 8000 permutations. For each of a couple of dozen modules. Not gonna happen.
I thought I might be able to get away with 3 unstored calculation fields such as:
CalculatedSortField1 = Case ( gSortField1 = "Title"; Title; gSortField1 = "Start Date"; StartDate; gSortField1 = "Participant Count"; ParticipantCount)
The problem is, if I save this calculation as a container field, I can't sort by it. If I set it as a text field, numbers and dates don't sort correctly.
Thoughts? Any help would be appreciated.