0

Proper Case code sample

It seems Ninox does not have a proper case function.  That is to say only the first letter of a sentence to be forced to Upper.  The best I could come up with is:

DESCRIPTION := upper(substring(DESCRIPTION, 0, 1)) + lower(substring(DESCRIPTION, 1, 100))

Only issuse would be the 101'st letter.  Of course I could replace 100 with a 1000 to cover myself but I am wondering if there is not a better way.

Of course this also does not cater for multiple sentences in a Note/Comment/Description.  I could go for capitalize which is fine for names but not notes etc.

Anyone figure out a solution?

5replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • The function capitalize() ?

    Like
  • you just want lower(string) then ... if you want all to be lower case

    Like
    • Fred
    • Fred
    • 5 days ago
    • Reported - view

    what about the length function?

    let desLength := length(DESCRIPTION)
    DESCRIPTION := upper(substring(DESCRIPTION, 0, 1)) + lower(substring(DESCRIPTION, 1, desLength))
    

    Now you don't have to worry about how long the DESCRIPTION data is.

    Like
      • Alan Cooke
      • Alan_Cooke
      • 5 days ago
      • Reported - view

      Fred Thanks @Fred works a charm.

      Like
Like Follow
  • 5 days agoLast active
  • 5Replies
  • 41Views
  • 4 Following