Rich S Posted August 13, 2008 Posted August 13, 2008 I thought this was going to be an easy task but apparently not: How do I remove the Title Case attribute from a text field? While in Layout mode, I highlighted the field (named Title) via the Format->Style->Plain Text menu choice, but that didn't work. Next, I wrote a script (see attached) but I think I botched it in the highlighted instruction therein. I have about a thousand records to change so doing so manually would take too long. Any ideas how I'd improve on my script to make the change? TIA for your help! Rich
comment Posted August 13, 2008 Posted August 13, 2008 Ae you sure the text is FORMATTED with Title case - not TYPED as proper?
Rich S Posted August 13, 2008 Author Posted August 13, 2008 I don't think it's typed as such. For example, in Browse mode the following title appears as "Interior Placards And Markings". If I try to replace the capital "A" in "And" by typing in a lower-case "a", the "A" stays upper-case. If I highlight the text (still in Browse mode) and go to Format->Text, the "Text format for selected text" windoid shows the Case checkbox as checked with Title Case selected. When I copy-and-paste "Interior Placards And Markings" into Word (and here), the "A" in And appears as a lower-case "a".
Colin Keefe Posted August 13, 2008 Posted August 13, 2008 Have you checked the Text Formatting on the layout object itself, in Layout Mode? Setting the Text Format to Title Case will override TextStyleRemove() at the display level. The formatting will be removed, it's just getting overridden by the formatting on the field. What Michael was getting at is that there's a difference between TYPING Title Case, and APPLYING Title Case as a text style using a function. TextStyleRemove will not touch the former.
Rich S Posted August 13, 2008 Author Posted August 13, 2008 Yup: In Layout mode the Text Format for "Title" windoid has Style checked as "Plain." I don't know who originally inputted the text for the field, but seeing that I can copy-and-paste a 20-record sample of them into Word and they all have lower-case articles and conjunctions, I suspect they were all entered that way.
comment Posted August 13, 2008 Posted August 13, 2008 OK, now it's clear (I think). The problem is you are using Insert Calculated Result[]. This is an editing step. Basically, you are inserting a plain-text string back into a formatted block, so it picks the formatting again. You should use Set Field[] or, since you want all records, Replace Field Contents[].
Rich S Posted August 13, 2008 Author Posted August 13, 2008 Thanks, Comment--that seems to have done the trick. Now I have a more interesting development with the same field: I want the text to appear bold in a portal so I set up the portal, entered Layout mode, selected the Title field, clicked on "B"--for Bold--on the Text Formatting toolbar, then went back to Browse mode. No change. If I manually select the text while in Browse mode then command it to turn bold, it does. The same thing happens with the parent table as well. All the other fields behave correctly when I boldface them so this is quickly turning out to be major head-scratcher with the Title field. On a lark, I exported the text then re-imported it again, but no change. (That trick occasionally works with "stubborn" text problems.) If I could I'd upload the file for your perusal but alas, no such luck on this site. Rats!
comment Posted August 13, 2008 Posted August 13, 2008 You should probably replace the data with TextStyleRemove ( YourField ; AllStyles ) to get rid of whatever seems to be clinging to it. OTOH, exporting and re-importing should also do it - what format did you use? If I could I'd upload the file for your perusal but alas, no such luck on this site. Why not?
Rich S Posted August 14, 2008 Author Posted August 14, 2008 Hi, again: I uploaded the file after gutting it to make it fit within the 1 MB limit on this site. (I should've been clearer when I wrote that earlier; 1 MB, even for a compressed file, is awfully small nowadays.) I exported the Title field's contents to a tab-delimited file that I opened in Word. That way, I can see if any "funny characters" are embedded in the text. The Title field's contents apparently don't have any, so I imported the data back into the solution file. The username and password are both: rich (Yeah, I know--really original.) There are two layouts, the EO Viewer and EO Data. As you'll see in EO Viewer, the up and down arrows control the sorting of the that column's fields. If you go to Title's tab--and in Layout mode--you'll see that both for the A-Z and Z-A sorts the field is selected for boldfaced text...though it's not showing it that way. "Good luck, Mr. Phelps." Supplement_Tracker.zip
comment Posted August 14, 2008 Posted August 14, 2008 I cannot open your zip archive (unknown compression type?).
Rich S Posted August 14, 2008 Author Posted August 14, 2008 It's a Winrar zipped file. (I don't have the more popular Winzip here.) You can go to the link below to download a Mac version (v3.71) of Winrar, but it doesn't have a GUI interface so it's Command Line City. http://www.rarlab.com/download.htm
comment Posted August 14, 2008 Posted August 14, 2008 It's not a .rar archive either (and if it's supposed to be a .rar archive, why does it have a .zip extension?). I suggest you post a file in any one of the formats that this forum allows.
Rich S Posted August 14, 2008 Author Posted August 14, 2008 Thanks for your patience. In Winrar, you can save a file as either a .rar or .zip extension (it gives you that option). I'll go hunt down somebody with Winzip since a zipped file is the only acceptable way to upload a working file here (as far as I know)
LaRetta Posted August 14, 2008 Posted August 14, 2008 (edited) You can download it free here or here - download trial version free Edited August 14, 2008 by Guest
Rich S Posted August 14, 2008 Author Posted August 14, 2008 Thanks, LaRetta, but we're not allowed to download programs by decree of our Sysop here at work. I found a kindred soul who already has Winzip installed on her own computer. So, here's the file... Supplement_Tracker_Edited.zip
comment Posted August 14, 2008 Posted August 14, 2008 It's a bit stubborn, but two methods seem to work: 1. Export your data to a plain text format (merge/tab/csv) and re-import it; or: 2. Replace field contents with: SerialIncrement ( YourField ; "" )
Rich S Posted August 14, 2008 Author Posted August 14, 2008 The SerialIncrement trick worked like a charm--THANKS!!! As an aside, and a learning experience, what could've caused the problem in the first place? Corrupted code? Cosmic rays? (If it's the latter it's time to wear tinfoil hats.)
Rich S Posted August 15, 2008 Author Posted August 15, 2008 (edited) It was imported from an FM Pro 8 Advanced file. Footnote: As far as I know the data was imported into FM Pro 8 from an Excel 2003 spreadsheet; the data was inputted manually into the spreadsheet. Edited August 15, 2008 by Guest Added a footnote
Recommended Posts
This topic is 6282 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now