October 13, 201015 yr Well, I _thought_ it would be easy... Please refer to the attached. What I want to do is change all the lower-case letters to upper-case ones in a field throughout all the records in a solution. When I run the script I get a message that says, "The Find/Replace option "Current field" requires a selected field." I then have to click/dismiss that message 26 times. I wonder why! So, what am I missing here? I told FMP to go to a field, do its thing, and it doesn't. The nerve! The only thing I'm sure of it's that it's a definite PEBCAK* problem. [color:red]*blush* TIA for your help! *Problem Exists Between Chair and Keyboard just_in_case.pdf
October 13, 201015 yr So to add a bit more ... you can use the Upper() function within a looping script or Replace Field Contents[], something like: Show All Records Go To Record/Request/Page [ first ] Loop Set Field [ that field ; Upper ( that field ) ] Go To Record/Request [ Next ; exit after last ] End If ... or same calc in Replace Field Contents[] ... however, why not just DISPLAY the data in all caps and leave it as it is as data? If you clean it up, there is no guarantee it will always stay clean and it might drive you nuts always trying to clean it. It is VERY difficult to find only records which are incorrect. From layout, Inspector - Appearance > Text Styles and Uppercase
October 13, 201015 yr Why not just use the Upper (text) function? Agreed. I suspect we should probably spell this out further though, and mention also that the wrong script step is being used. It should be the Replace script step and not the Find/Replace script step. Replace( yourField; upper( yourField)) Replace.fp7.zip
October 14, 201015 yr Author Thanks, everybody. Just so you know why I'm doing this... What few people realize is that the US Postal System's address formatting standard requires that addresses have no punctuation and consists of all upper-case letters. What I'm trying to do is clean up the data _then_ put a filter in place (the Upper command) so from now on addresses will all be in upper-case.
October 14, 201015 yr I would do what LaRetta suggested: format the field to display as Uppercase on the printing layout. With all due respect to the post office, they should not dictate how addresses are stored in my database - and I find "1600 Pennsylvania Avenue NW" much more usable than "1600 PENNSYLVANIA AVENUE NW".
October 15, 201015 yr Author You have a valid point, Comment--and I agree with you--but to play Devil's Advocate... When creating mailing labels you need to know how much text can fit on a line using "all caps." If users can see right off the bat in Browse mode that a line/field of text is too long then they can make changes accordingly before going to print.
October 15, 201015 yr you need to know how much text can fit on a line using "all caps." If users can see right off the bat in Browse mode that a line/field of text is too long then they can make changes accordingly before going to print. That's up to the developer to provide. LabelPreview.zip
Create an account or sign in to comment