Solved

Filemaker format field

Posted on 2014-01-14
3
469 Views
Last Modified: 2014-01-15
Hello
I'm looking to fin how to automaticcaly delete the space and the "Enter" Key at the end of a field when a user enter those caracters ?

For example :
"THE PRODUCT
"
I would like "THE PRODUCT", without space and enter at the end
Tanks
0
Comment
Question by:mdmmp
  • 2
3 Comments
 
LVL 25

Accepted Solution

by:
Will Loving earned 500 total points
ID: 39780657
The simplest way to do it is to go to the Auto-enter options for the field and enter the following:

Trim( GetValue( Self ; 1 ) )

This combines two FileMaker functions, Trim() which removes leading and trailing spaces, and GetValue() which will find the nth value in a carriage separated list. It also makes use of the Self function which tells the function to act on the current value in the field.

GetValue( Self ; 1) effectively strips off any trailing carriage returns by saying, by finding the first value, in effect, "find all text prior to the first carriage return". The Trim function then removes any leading or trailing spaces.

In order for this to work, the Auto-Enter calculation must be set to run anytime an entry is made or modified. To do this, uncheck "Do not replace existing value of field (if any)"

Auto-enter calculation
0
 

Author Comment

by:mdmmp
ID: 39781677
Tanks it works perfectly
I have 2000 existing entries that I would like to modify with this function.
To script, that I just activate the record and then go to the next one, or is there an easier solution ?
0
 
LVL 25

Expert Comment

by:Will Loving
ID: 39782322
Use the "Replace" function to change all the records.

First, Show All records, then click in the field you want to update. Select "Replace Field Contents…" from the Records menu and then in the "Replace…" dialog click "Specify Calculation" and enter the Auto-enter calculation. This will apply the function to all records.

A word of caution: The Replace function is fast and effective but it has NO "Undo". Make sure you have a backup of your data in case you make a mistake.
0

Featured Post

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question