Rich S Posted October 13, 2010 Posted October 13, 2010 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
Lee Smith Posted October 13, 2010 Posted October 13, 2010 Why not just use the Upper (text) function?
LaRetta Posted October 13, 2010 Posted October 13, 2010 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
bruceR Posted October 13, 2010 Posted October 13, 2010 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
Rich S Posted October 14, 2010 Author Posted October 14, 2010 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.
comment Posted October 14, 2010 Posted October 14, 2010 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".
Rich S Posted October 15, 2010 Author Posted October 15, 2010 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.
comment Posted October 15, 2010 Posted October 15, 2010 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
Recommended Posts
This topic is 5153 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