Solved

Filemaker format field

Posted on 2014-01-14
3
494 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 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

623 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