Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help for School - Proper Case 1

Status
Not open for further replies.

sbonnett

Programmer
Mar 20, 2004
3
US
I need help with a form for our school. I want to force the Name field to always be in Proper Case. Can someone help me? I tried the @ProperCase but that didn't work. I want to be able to convert whatever someone puts in that text field (Name) to Proper Case. Thanks in advance.
 
You say that did not work. Where did you put the formula, and what formula did you use exactly ?
Given that the field you are using is to be edited by the user, you are obviously using a text field that is editable.
Editable fields have three possible formula types :
- Default
- Translation
- Validation

The Default type is where you put a formula that gives the value of the field when the document is created. Handy for putting the name of the creator of the document, for example.
The Translation type is where you put code that operates on the value of the field, or updates another field (but be wary of side effects here).
The Validation type should only be used to check if the field value is correct when the document is to be saved. The return value can only be TRUE or FALSE - if TRUE, then the document can save (unless another Validation Formula in a different field disagrees).

In your case, you need to put code in the Translation Formula to control the value the user is inputting. You correctly identified @ProperCase as the code to use, but I have a hunch that you did not give it the proper attribute.
If your field is named "Name", then the formula should be :
Code:
@ProperCase(Name)

That should work.

Pascal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top