Picking a string out of a text field and making it upper case. - InfoPath Dev
in

InfoPath Dev

Picking a string out of a text field and making it upper case.

Last post 05-12-2015 08:10 AM by rjj88. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 05-12-2015 08:10 AM

    • rjj88
    • Not Ranked
    • Joined on 05-12-2015
    • Posts 2

    Picking a string out of a text field and making it upper case.

    Hi all.. My first of what will probably many, many noob-question posts. 

    Can anyone suggest how to select a specific word and make it upper case?
    E.g. A rich text field contains a block of text in which my surname appears twice - can I make those two instances of my surname upper case?

    Additionally, if my surname is entered in another 'SURNAME_field', can it be referenced in the function so, perhaps, someone else's name could be used?

    I'm sure it's possible with a lengthy function, but I'm not clued up enough to build one!

     

    PS. - I found lots of questions being answered about making all text in a field upper case, or just capitalizing the first letter using the functions below, but not picking out a specific string.

    1) Convert all to uppercase:
    translate(., "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ")

    2) Convert first letter to uppercase:
    concat(substring(translate(., "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"), 1, 1), substring(., 2, string-length(.) - 1))

     

    <\rjj88>
Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.