
OpenNTF Code Bin
About This Code
Brief Description:
Sort months by name (@Sort formula example)
Notes Version:
R8.x, R7.x
Last Modified:
20 Feb 2008
OpenNTF Disclaimer
All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.
Code / Description
asMonths := "January":"February":"March":"April":"May":"June":"July":"August":"September":"October":"November":"December";
@If(
@IsDocBeingSaved | @IsDocBeingMailed;
@Sort(@ThisValue; [CustomSort]; @Member($A; asMonths) > @Member($B; asMonths));
@ThisValue)
Usage / Example
If you have a multi-value keyword field that contains months, you can use this as the translation formula to guarantee that months are sorted in correct order regardless of how the user entered them.
Comments
No documents found