Our Preferred 5 Star Hosting Provider - Award Wining FileMaker Pro Hosting
Results 1 to 6 of 6
  1. #1
    FREE Member
    Join Date
    Mar 2011
    Posts
    12
    Downloads
    0
    Uploads
    0

    Restricting data entry in Filemaker Pro 11

    I just started working with FMP 11 and I'm having difficulty in getting certain fields to accept only pertinent data. For example if I'm asking for a website or an email address, I want a notification to pop up if they did not enter a valid web address or email. I have successfully formatted fields so that the user is required to enter data, however I cannot control what type of data they enter.

    Thanks in advance
    Joseph
    Warning: This is an Old Thread
    This discussion is older than 420 days. information contained in it may no longer be current

  2. #2
    Senior Moderator - FMT Preferred Developer Consultant Arizona, NM, Texas, Southwest USA
    Join Date
    Mar 2006
    Posts
    2,807
    Location
    So. Arizona
    FileMaker Version
    FM 10 Developer, FM 11, FM 11 Server, FM 12 Server
    OS
    Windows & Mac
    Skill Level
    Developer
    Downloads
    0
    Uploads
    0

    Re: Restricting data entry in Filemaker Pro 11

    The easiest way to deal with email, is a 2 field entry, with an auto-enter calc in a 3rd field that stores the structure together.

    NameinAddress & "@"& DomainName

    Other field, you can use the OPTIONS Validation to test for values.
    An auto-enter calc can be set up to look at entry, and format the field, or even validate on range, with defined responses.

    An auto-enter calc for a range of numeric values, with a field level response on error
    Code:
    if (Int (Self) > 250 or Int (Self) < 20 ; "Err" ; Int(Self) )
    Phone numbers can get formatted automatically as well.
    Code:
    Let ( [
      ph = Filter (Phone ; "0123456789");
      len = Length (ph);
      areaCode = Case ( len = 10 ; Left (ph; 3; " ");
      exchange = Case (len = 10;Middle (ph;4;3); Left (ph;3));
      end = Right (ph;4) ];
    
    Case (
       len = 10 ; "(" & areacode & ")" & exchange & "-" & end ;
       "Error: "
      )
    )
    Lots of flexibility, according to what you want to accomplish.....

  3. #3
    FREE Member
    Join Date
    Mar 2011
    Posts
    12
    Downloads
    0
    Uploads
    0

    Re: Restricting data entry in Filemaker Pro 11

    Thanks for the pointers but when I try to enter these in the specify calculation window under the "Validation for field "Email" =" I get several errors for both examples.
    For the email address am I supposed to have a field, then an "@" symbol and another field after that, with a third field that displays the complete address? When I enter "NameinAddress & "@"& DomainName" it says that it cannot find the specified fields "NameinAddress" and "DomainName," what should I be looking to enter there? I only have the one email field so I'm confused why it's asking for further fields.
    For the phone number example FMP points outthat the "Left (ph; 3; " ");" section on line 4 has to many parameters. Specifically that the semicolon after 3 and before the double quotation marks is the problem's source. Is this because I am using the pro version and not the advanced version?
    Again I appreciate your help.
    Joseph

  4. #4
    Senior Moderator - FMT Preferred Developer Consultant Arizona, NM, Texas, Southwest USA
    Join Date
    Mar 2006
    Posts
    2,807
    Location
    So. Arizona
    FileMaker Version
    FM 10 Developer, FM 11, FM 11 Server, FM 12 Server
    OS
    Windows & Mac
    Skill Level
    Developer
    Downloads
    0
    Uploads
    0

    Re: Restricting data entry in Filemaker Pro 11

    Joseph - let's do the email first - the others are typos from attempting to transpose FM code into text, and doing it late at night. The FM clipboard is XML, so there is no cut and paste outside of FM. The best one can do, is print to PDF then cut and paste the PDF, but I tried retyping.

    On the email.

    a text field for name
    a text field for domain
    a text field for email, that is an auto-enter calc, not open to browse.

    The calc is name & "@" & Domain

    The ampersand concatenates fields and strings. The quotes surround literal text, in this case, an @ sign. Name and Domain are field names you pick from the calc dialog.

    The left image is in layout mode - the right, in browse mode, with data entered. As you finish entering data in each field, the email field will build dynamically from the auto-enter calc (options in field definition - manage database).
    Attached Images Attached Images

  5. #5
    Senior Moderator - FMT Preferred Developer Consultant - Minnesota - Upper Midwest - USA - Global Ender's Avatar
    Join Date
    May 2004
    Posts
    3,688
    Location
    Minneapolis, MN
    FileMaker Version
    FM 11 Server, FM 12
    OS
    Mac
    Skill Level
    Developer
    Downloads
    0
    Uploads
    0

    Re: Restricting data entry in Filemaker Pro 11

    Ho Joseph, welcome!

    The built-in field validations are a tempting option in FileMaker, but can be problematic. If your user is in the middle of data-entry, and either does not have the data to enter (say the contact does not have an email address,) or gets interrupted and needs to leave the screen, such validation warnings will drive your users bananas. Worse, they will start entering dummy data into the fields just so they can leave the screen (trying to clean up dummy data is much more difficult than trying to clean up missing data.) Those validations can also get in the way if you have scripted processes that need to loop through the records to apply a change.

    I'm a big advocate of passive validations for fields, and scripted status updates to show the completeness of the data entry. As an example, for critical data, what I would do is use custom functions (available in FileMaker Advanced) in auto-enter calcs in the fields to show if the data that has been entered fits the desired format using text coloring to highlight the error. And/or a calculated checkmark or asterisk to indicate when a field or section is complete or missing data. Then I'd have a process button at the end of the data entry section that checks that all the required pieces are in place and entered correctly, and then posts some sort of Date Processed. That date being entered is then used by a Status calc to indicate the status of the record as being Complete or whatever. It's then an easy matter to locate records that are Incomplete, and finish the data-entry as needed.

  6. #6
    FREE Member
    Join Date
    Mar 2011
    Posts
    12
    Downloads
    0
    Uploads
    0

    Re: Restricting data entry in Filemaker Pro 11

    Thanks for the tip Ender, it's funny you mention driving users bananas because while I was testing this I was driving myself bananas with the constant reminders to delete the record or try to figure out what it wanted.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Challenging: One portal for data entry and one to view all the entered data
    By ozziggy in forum FileMaker Pro 12 - All versions
    Replies: 2
    Last Post: 05-09-2013, 01:56 AM
  2. Restricting entry to 2 decimal places: how to?
    By Molson in forum FileMaker Pro 9
    Replies: 6
    Last Post: 01-10-2009, 12:32 PM
  3. Portal data being duplicated at data entry
    By JDH in forum Portal & Relationships
    Replies: 1
    Last Post: 07-17-2007, 11:27 PM
  4. Replies: 2
    Last Post: 11-18-2006, 04:49 PM
  5. Data Entry over existing Data
    By presley in forum ScriptMaker and Scripting
    Replies: 9
    Last Post: 04-12-2004, 01:20 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Welcome to the Original FileMaker Forum
With designated forums for almost every FileMaker topic...FileMaker Today is a free-to-join community where you can boost your FileMaker expertise, build better solutions and solve your technical challenges. If you're building FileMaker solutions, this is the place for you.
Follow FMT
We Are FMT
FMT is home of The World's leading FileMaker News Site, Worldwide Developer Directory, FileMaker Connect Community and so much more.