Case Displayed in Popup List

General support questions.
Posts: 4
Joined: Sun Jun 26, 2005 8:45 am
Location: Cleveland, Ohio
PostPosted: Sat Jul 16, 2005 6:26 pm
Is there any way to set text format in a popup list? I have all my customer fields set to display titlecase but over the years the text has been entered in all lowercase and some in all upper case. This makes the popup list look bad. I have even found records where half the input is upper and half lower. Short of having to retype all the bad entries is there a script that can fix the text or a way to set the format in the popup list.

Thanks
LDR
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Sun Jul 17, 2005 9:57 am
As you've noticed, the pop-ups display the index of the field in question and do not respect field formatting: you have to change the data itself to change the appearance of the pop-up list.

Fortunately, FM7 gives us some cool ways to do this. One method is to use an Auto-Enter calculation that formats the text for you. Something like: Proper(MyField).

Be sure to *uncheck* "Do Not Replace Existing Value of Field (if any)". This will reformat the text in each field as soon as it is entered. Once this is in place you can fix legacy records by running a Replace command (put your cursor in the field in question and select Records / Replace Field Contents) on your found set, replacing each entry with itself (use a calculation that is nothing but the field itself). This will force the auto-enter calculation to fire, reformatting each record.

While you're at it, you can remove things like Bold, Underline, and Colors at the same time using something like: TextColor ( TextStyleRemove ( Proper ( text ) ; AllStyles ) ; RGB ( 0 ; 0 ; 0 ) )

(For a more interesting version of Proper() , check out this function.)

Hope that helps,

John
John Sindelar
SeedCode
Posts: 4
Joined: Sun Jun 26, 2005 8:45 am
Location: Cleveland, Ohio
PostPosted: Sun Jul 17, 2005 4:02 pm
Thanks John...

That did the trick. The index is now all the same and the field is set to format correctly no matter what gets typed.
LDR

Return to General Support

Who is online

Users browsing this forum: No registered users and 3 guests

(855) SEEDCODE
[email protected]
Follow us: