Thomas Seidler Posted November 25, 2010 Posted November 25, 2010 Name: Sort Records by Calculation Type: Script Step Parameters: fieldNameList [ValueList], sortOrderList [ValueList] These are both set by specify calculation dialog boxes. It is the users responsibility to make sure they balance - otherwise script step returns error ("invalid parameters" or some such). fieldNameList is a valueList of field names. sortOrderList is a valueList containing: ascending, descending OR 'valueList' for custom order. Behaviour: if ( ValueCount ( fieldNameList ) ≠ ValueCount ( sortOrderList ) ) then ERROR "invalid parameters" (as above) Perform sort with field order given in list, using sortOrder to determine individual field sort order. Example usage: Sort Records by Calculation ( "MonthsOverdue¶DueAmount" ; "Descending¶Descending" ) Workaround [Mac only]: Put it in a script wrapper with those two parameters. Have sort fields present on layout to enable use of following code within PerformAppleScript: "sort by { field "" & Substitute( $fieldnameValueList ; "¶" ; "", field "" ) & "" } in order { " & Substitute ( $sortorderValueList ; "¶" ; ", " ) & " }"
David Jondreau Posted November 26, 2010 Posted November 26, 2010 Instead of AppleScript, I suspect there's a way to kludge this using XML and Snapshot Link.
Recommended Posts
This topic is 5451 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