Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Filemaker format field

Posted on 2014-01-14
3
Medium Priority
?
512 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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

782 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