My teammate found a bug when using proper() to display a label; a word preceded by a non-alphabetic character will not be converted to proper case.
If the 11th floor is home to the HR department.
We would expect:
Floor 11 (Human Resources)
but instead get:
Floor 11 (human Resources)
To reproduce the issue, I used this expression to check capitalization:
proper( "I am reporting that ""proper() coNverts each [alphabetic] cHaRacter into ProPeR caSe " & "(unless a non-alphabetic character precedes it)""" ),
Where I would expect:
I Am Reporting That "Proper() Converts Each [Alphabetic] Character Into Proper Case (Unless A Non-alphabetic Character Precedes It)
It's returning:
I Am Reporting That "proper() Converts Each [alphabetic] Character Into Proper Case (unless A Non-alphabetic Character Precedes It)
Is proper() working as designed?
Side note: 22.4 documentation reads, "Converts each character in the text into proper case, meaning it will capitalize the first first letter of every word and convert the rest into lowercase. (https://docs.appian.com/suite/help/22.4/fnc_text_proper.html")
Discussion posts and replies are publicly visible
I'm not sure this is a "bug" so much as a constraint, possibly crossed with a lack of specificity in the documention (re: the snippet you copied). I suppose the documentation should be rephrased to something more like, "capatialize the first non-whitespace character, where applicable, of every whole word in the string". I suppose you could argue that the function should specifically exclude non-alphabet characters from its logic, though it seems like that might be expecting too much from a function like this.