Discussions

Expand all | Collapse all

Converting Field Contents To Sentence Case

  • 1.  Converting Field Contents To Sentence Case

    Silver
    Contributor
    Posted 09-21-2017 05:14
    Is there a function that converts contents of a field to sentence case (each starting letter upper case)? 


  • 2.  RE: Converting Field Contents To Sentence Case

    Posted 09-21-2017 09:20
    Hi Arshad
    Not in Native Quickbase to best of my knowledge. We can user JQuery instead. if that can work, then a string operation can be done to read the field value, scan for . (stop) and apply upper to the next character.


  • 3.  RE: Converting Field Contents To Sentence Case

    Silver
    Contributor
    Posted 09-21-2017 21:28
    Thanks.  Appreciate your response but I thought if there was a formula like in Excel (=proper()) which does the trick. 


  • 4.  RE: Converting Field Contents To Sentence Case

    Bronze
    Contributor
    Posted 09-21-2017 21:35
    My first thought on this was to look around for an open API that would do this for you. Pass it a text string and what form of upper/lower case you want and have it pass back the converted text. I couldn't find such a thing here (but maybe I wasn't searching well enough):

    https://www.programmableweb.com/apis/directory

    Something that works like this does manually:
    https://convertcase.net/


  • 5.  RE: Converting Field Contents To Sentence Case

    Silver
    Contributor
    Posted 09-21-2017 21:54
    Many thanks for your effort. 


  • 6.  RE: Converting Field Contents To Sentence Case

    Posted 09-21-2017 21:55
    Arshad
    Are these short phrases? It be done by a native formula if there were a limited number of words.


  • 7.  RE: Converting Field Contents To Sentence Case

    Silver
    Contributor
    Posted 09-21-2017 21:57
    Mark

    These are a short phrases people are entering which are then listed at the top of the record as the heading.  I was hoping to have that label convert the text.  


  • 8.  RE: Converting Field Contents To Sentence Case

    Top
    Contributor
    Posted 09-22-2017 01:37
    Use the IOL technique on the form when the text is originally entered. See screenshot and script manually applied through the console.

    $("#_fid_6").on("blur", function() {
      _fid_6.value = _fid_6.value.replace(/\b\w/g, word => word.toUpperCase());
    });