MarvinJ920 Posted June 22, 2005 Posted June 22, 2005 I've created a fairly in-depth database that requires us to import emails into it. I have created a script that pastes the entire email into a field. (WITHOUT styles of course) Then the rest of the script breaks the email apart and uses set field functions to put it into the appropriate fields. My problem lies in that when the information is placed into the fields they have a formatting of 12pt Helvetica, etc. I need NO formatting so that this can be changed within the layout. I understand the entered formatting takes precedence over layout formatting. Any suggestions??
Lee Smith Posted June 22, 2005 Posted June 22, 2005 Hi Marvin, If you paste text Manually, you need to include the Option key in your Keyboard combination [color:"blue"] Command + Option + V Or If you are using a script, you need to click the button for the Paste step at the bottom [color:"blue"] Paste Without Style . HTH Lee
MarvinJ920 Posted June 22, 2005 Author Posted June 22, 2005 Yea. I pasted the entire email into a temporary field using the paste without style. This works fine. When the script breaks the text in that temporary field into their appropriate fields, is where the problem lies. I used the set field function and in doing this, it tags the text with Helvetica 12pt. Therefore when I try to change the formatting within the layout, the formatting stays Helvetica 12pt. I need a way to send the text to a new field with 'no formatting' Thanks for ur help tho
Lee Smith Posted June 22, 2005 Posted June 22, 2005 AFAIK, all fields need to have a Font Description. You used to be able to store a field as ASCII, but it was done through the Option box for the Field. I don't see that Option now, and a Search of the Help didn't Help (Pardon the Pun). Pardon my ignorance here, but I have not had a parsing problem in the past due to Helvetica Or a different text being the Field default. I have had problems with Smart Quotes though, could that be your situation? If so, you can turn that off in[color:"blue"] "Menu >> File >> File Options >> Text" Otherwise, someone else needs to jump in, attach a copy of your paste, and file, better describe what is not happening in your parse. HTH Lee
comment Posted June 22, 2005 Posted June 22, 2005 AFAIK, all fields need to have a Font Description I don't think that is so. Text fields need to have a a language for indexing or sorting, but text can still be plain text, with no font/size/style associated with it. Version 7 uses Unicode instead of ASCII. This part is not clear: I used the set field function and in doing this, it tags the text with Helvetica 12pt. There's no reason why Set Field[] would tag text with a font and a size, unless text formatting is expressly specified. More likely the source field is already so tagged, and Set Field[] merely preserves this. In any case, the cure is to reset the fields to plain text.
Lee Smith Posted June 23, 2005 Posted June 23, 2005 I don't think that is so. Text fields need to have a a language for indexing or sorting, but text can still be plain text, with no font/size/style associated with it. Well, I think you are wrong. FileMaker assigns a Font through the Preferences. You can change the font on the layout, but the option for ASCII or Unicode are not among the options. I believe that the display of of the data on screen, and the computer language are two separate things. I'm not programmer, so maybe someone who is can shade some light on it for us. Mildly Curious
comment Posted June 23, 2005 Posted June 23, 2005 No, Lee - FileMaker assigns a default font for a particular input type through the Preferences. ASCII and Unicode are not fonts, so of course they are not an option. It's easy to see that the default font is not being automatically applied to text in a field: Define a calc field = GetAsCSS ( textfield ) Type some text in textfield and see the styles it has. Next, select some of the text and apply your default font to it - then you will see what it means when text does have a font attribute.
MarvinJ920 Posted June 23, 2005 Author Posted June 23, 2005 Well, I'll let you guys bicker about font defaults, lol But i tinkered around with the temporary email field and it turns out that the information in this field somehow had obtained the Helvetica 12pt formatting, eventhough I had the paste without styles checked. I deleted everything out of the field, and changed the field's font size to 6pt and when I ran the script, everything worked perfectly. So now all of the information being fed into my database is imported as plain text! woohoo! lol neway, thanks again for making look at it, instead of saying *******, why doesn't it work. Thanks!
Lee Smith Posted June 23, 2005 Posted June 23, 2005 sure about that huh, Post a demo file, because it displays the same attributes in both fields when I did what you said. If there is instructions, make them simple so I can follow them. Either I'm doing something wrong,... or we are saying the same thing in two different ways. Lee
comment Posted June 23, 2005 Posted June 23, 2005 See attached. Once you reset the field to plain text, you shouldn't see any font attributes in the style. Make sure you have 7.0v3, 'cause I vaguely recall some issue about that in this respect. showFont.fp7.zip
Lee Smith Posted June 24, 2005 Posted June 24, 2005 Hi comment, Thanks for the Sample file, it does a great job of showing how the new GetAsCSS function works. It doesn't disprove my point that all fields have a Font assigned to them through the preferences. Even your example file, while describing the attributes of font used in the other field, does it using the font assigned to the field. Lee
comment Posted June 24, 2005 Posted June 24, 2005 I shall have to disagree again. Not all fields have a font assigned to them, and certainly not through the preferences. Only fields that are placed on a layout have a font assigned to them. Even more precisely, only INSTANCES OF FIELDS placed on a layout have a font attribute. You can place two instances of the same field on the same layout, and format each one with a different font. What is the "font assigned to the field" then? If you copy the data from one instance of the field, and paste it to the other one, the font information is not being passed. I don't know where you're going with this point. Poster said "when I try to change the formatting within the layout, the formatting stays Helvetica 12pt". This is a clear indication that the data itself is tainted with a font and size attribute. The default state for data is to have no styling attributes. That's what happens when you type into a field. There's no font, no size, no color, etc. associated with the data. It's 'plain text' (as opposed to 'styled text'). An instance of field placed on a layout is but a window to the real data, a viewer. Obviously you need to assign a font to the viewer - how else is the data going to be displayed, when it has no font of its own? But that font is assigned only to the field instance on the layout - not to the field itself.
Recommended Posts
This topic is 7093 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