4 Replies Latest reply on Sep 10, 2016 5:17 PM by user19752

    Lowercase

    BrianWoods

      I am trying to change the first letter in certain sentences to lower case.   However, some sentences start with opening quotes rather than letters.

       

      I thought using the Case function nesting the Left function inside the Lower function would solve my problem. See below...

       

      Case (

       

      Left ( Sentence1; 1 ) = """;

      Lower ( Left ( Sentence1; 2 );

       

      Left (  Sentence1; 1) ≠ """;

      Lower ( Left ( Sentence1; 1 );

       

      )

       

      Any help would be greatly appreciated.

        • 1. Re: Lowercase
          David Moyer

          Hi,

          from your example, it looks like you're not including the rest of the text - just the first one or two characters.

          In that case, you'll need to include the Right and Length functions as well.  Or, consider Lower(LeftWords( ... and RightWords (and WordCount)..

          • 2. Re: Lowercase
            Johan Hedman

            If you field have any information, then do you want to have first letter as lower case? Your calculations results is when First letter is empty (then you should check if all field is empty) then show first two letter as lower case. Second option if first letter is not empty then show first letter as lower case. I think what you want is if field is empty, then show nothing, but if it have information give me the first letter as lower case.

             

            I would to you calculation like this

             

            Let(

            text = Sentence1

            ;

            Case(

            // If Sentence1 Not is empty, then give me the first letter as lower case

            text  ≠ ""; Lower( Left( text ; 1 ) )

            )

            )

            • 3. Re: Lowercase
              PeterDoern

              How about:

               

              Case (

                Left ( Sentence1 ; 1 ) ≠ "\"" ;

                Replace ( Sentence1 ; 0 ; Length ( LeftWords ( Sentence1 ; 1 ) ) ; Lower ( LeftWords ( Sentence1 ; 1 ) ) ) ;

                // Else

                Sentence1

              )

              • 4. Re: Lowercase
                user19752

                Let ( n = Case ( Left ( Sentence1; 1 ) = "\"" ; 2 ; 1 ) ; Replace ( Sentence ; 1 ; n ; Lower ( Left ( Sentence ; n ) ) ) )