January 15, 200223 yr Here is some Javascript which will extract the last three characters: script> var mystr = "Smith-123" ; var num = mystr.substr(mystr.length - 3,3) ; document.write(num); </script> Hope this helps. Garry
January 16, 200223 yr I am trying to only display the three right three characters in a FMP field with CDML. The field named "last_name_zip3" contains the value: Smith-123 and I want to only display the right three characters on the web page with a CDML command/syntax (in this case the value is "123"). This would be similar to the "Right" command in a FMP calculation - as in Right(last_name_zip3, 3). I can create a new field and put the value into that field, and then display that field, but I am trying to limit having to add another field to my database, which contains 5.5 million records... Thanks, Tony -- Tony Darnell <[email protected]>
January 21, 200223 yr ... or make a calc field in the database Right(last_name_zip3, 3) and display this field.
Create an account or sign in to comment