Tagged: sort, Table, text input
This topic contains 2 replies, has 0 voices, and was last updated by pmeidinger 9 years ago.
- AuthorPosts
- February 24, 2012 at 4:53 pm #963
I’d like to sort a Text Input column of employee names in a Table. I know there’s no built-in sorting function in the Table object, so I’m using helper fields and tables. However, comparing strings to see which one comes first alphabetically doesn’t seem to work.
For instance, if I do a Simple Branch with
'a' < 'b'
it always returns false. What’s the correct way to compare two Text Inputs to see which comes first alphabetically?February 24, 2012 at 6:17 pm #6018You could use a Java script to sort a string alphabetically. There is an example on this web site: //www.roseindia.net/java/javascript-array/javascript-array-sort-alphabets.shtml/. The form would have to be embedded in a page that contains the Java script. Use the Call Java Script behavior object: /Documentation/manual/html/?fg_calling_javascript_from_a_form.htm.
If you wanted to create a web service that sorts alphabetically you could use that as well. I couldn’t easily find any examples of web services that sort alphabetically, but I didn’t search for too long.
February 24, 2012 at 6:29 pm #6019Thanks for the response, Dennis!
- AuthorPosts
You must be logged in to reply to this topic.