Jump to content

Force the First Character in a Field to be Capitalized


Admin1676454018

Recommended Posts

// This rule forces the first character of a field (typically a field that contains a name) to be upper-case.

 

 

var currentField = Field("FullName");

splitFieldVar = currentField.split(" ");

newVar = ""

for (i = 0; i < splitFieldVar.length; i++)

{

newVar += splitFieldVar.substring(0, 1).toUpperCase() + splitFieldVar.substring(1, splitFieldVar.length).toLowerCase() + " ";

}

return newVar;

Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...