Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Filemaker format field

Posted on 2014-01-14
3
Medium Priority
?
507 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

704 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