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?

5 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 1 yr ago
    • Reported - view

    The function capitalize() ?

    • Mel_Charles
    • 1 yr ago
    • Reported - view

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

    • Fred
    • 1 yr 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.

      • Alan_Cooke
      • 1 yr ago
      • Reported - view

      Fred Thanks @Fred works a charm.

Content aside

  • 1 yr agoLast active
  • 5Replies
  • 80Views
  • 4 Following