Pascal Case in Appsheet

Hello all,

I am struggling to find a valid_if expression, which to push the user to fill a form field with "Pascal Case" method only:

Example: Correct should be - "Samuel Smith Smith". The wrong must be: "Samuel smith Smith".

Every new word (it will be used for the customer name field) must start with the capital letter. 

I found a way to push the users to use only Upper case, but with this one I stucked.

Thanks in advance.

Solved Solved
0 13 960
2 ACCEPTED SOLUTIONS

With two words I have used this method with the Valid_IF which checks the first upper letter and small letters after that.

AND(
FIND(
UPPER(LEFT(INDEX(SPLIT([_THIS]," "),1),1))&LOWER(MID(INDEX(SPLIT([_THIS]," "),1),2,10)),
INDEX(SPLIT([_THIS]," "),1)
)
>0,
FIND(
UPPER(LEFT(INDEX(SPLIT([_THIS]," "),2),1))&LOWER(MID(INDEX(SPLIT([_THIS]," "),2),2,10)),
INDEX(SPLIT([_THIS]," "),2)
)
>0
)

@MultiTech This came from AleksiAI ๐Ÿ˜‰

View solution in original post

Thanks,

This is what I was able to do with your help. It it almost as a PROPER function and works for 1 word OR 2 words OR 3 words:

OR(AND(
FIND(
UPPER(LEFT(INDEX(SPLIT([_THIS]," "),1),1))&LOWER(MID(INDEX(SPLIT([_THIS]," "),1),2,15)),
INDEX(SPLIT([_THIS]," "),1)
)
>0,COUNT(SPLIT([_THIS]," "))=1),
AND(
FIND(
UPPER(LEFT(INDEX(SPLIT([_THIS]," "),2),1))&LOWER(MID(INDEX(SPLIT([_THIS]," "),2),2,15)),
INDEX(SPLIT([_THIS]," "),2)
)
>0,COUNT(SPLIT([_THIS]," "))=2),
AND(
FIND(
UPPER(LEFT(INDEX(SPLIT([_THIS]," "),3),1))&LOWER(MID(INDEX(SPLIT([_THIS]," "),3),2,15)),
INDEX(SPLIT([_THIS]," "),3)
)
>0,COUNT(SPLIT([_THIS]," "))=3)
)

 

Thanks again,

BR

View solution in original post

13 REPLIES 13