8 Replies Latest reply on Apr 22, 2009 9:19 PM by ohhhmy

    Space in front of field

    ohhhmy

      Title

      Space in front of field

      Post

      Hi Everyone,

       

      I have an unusual problem.

       

      In my email field there is a space that is in front of all the email address that I put in. How do I get rid of this space? I have to manually backspace before i paste in or type in an email address.

       

      Thanks

        • 1. Re: Space in front of field
          philmodjunk
            

          Perhaps the field options for this field has been set to auto-enter a space when the record is created.

           

          Go to Manage | Database | Fields and check the field options carefully.

          • 2. Re: Space in front of field
            ohhhmy
               Nothing is checked off when I go to Manage > Database > Emails > Options > Auto enter....
            • 3. Re: Space in front of field
              obeechi
                 Try creating a second email field and see if the problem still occurs. If it doesn't, carefully compare the two in all aspects. 
              • 4. Re: Space in front of field
                philmodjunk
                  

                Any chance you have a script that is modifying the contents of the field?

                 

                With any version of FMP, you might have a script set to execute when the file opens. With FMP 10, you also might have script triggers causing scripts to execute when you did not expect.

                 

                Another script suprise is if a script has been paused and it continues when you press the enter key.

                • 5. Re: Space in front of field
                  ohhhmy
                    

                  No scripts that I know of. I'm running file maker 9, the only script that I have related to email is the button to the left of the email field which is a shortcut to create an email in outlook.

                   

                  Thanks again for your input, I'm still trying to figure this out.

                  • 6. Re: Space in front of field
                    ohhhmy
                      

                    I found my problem, the problem was within the data that I imported into Filemaker had a space in the email field of all the fields that had no addressess.


                    Is there a way for me to eliminate all spaces in the database in the email field?

                     

                    Thank.

                    • 7. Re: Space in front of field
                      davidhead
                        

                      There are two aspects to this:

                       1. fixing existing records that have been imported, and

                       2. making sure that new imports are automatically fixed. 

                       

                      I am not sure which one you want to address (maybe both).

                       

                      To fix existing records (make sure you have a current backup before starting):

                       

                      1. Records > Show All Records

                      2. Click in the email field and choose Records > Replace Field Contents...

                      3. In that dialog, select "Replace with calculated result" 

                      4. For the expression, enter:  Trim ( email )

                      5. Click OK, then click Replace

                       

                      To ensure that this is fixed in future imports:

                       

                      1. File > Manage > Database...

                      2. Double-click the email field to open field options

                      3. Choose Auto-Enter - Calculated value

                      4. For the expression, enter:  Trim ( email )

                      5. Click OK

                      6. Uncheck the box for "Do not replace existing value of field (if any)"

                       

                      When you import records, make sure you perform auto-enter commands. 

                      • 8. Re: Space in front of field
                        ohhhmy
                          

                        That did the trick.

                         

                        Thank you