My.ADVISOR.com Sign-In
Username
Password
Sign Up 
Go to Article
Advanced Search 

ADVISOR TIPS

Easy Portal Entry Without Scrolling to the Last Record

Portals are great, but entering new data in them can be a pain. This trick transforms the entry process.

By Bob Gossom

UNLOCKED -- This article is provided to subscribers of DATABASED ADVISOR or FILEMAKER ADVISOR or FILEMAKER PRO BASICS ADVISOR. To subscribe or renew, go to Advisor Store.

Portals are great, but entering new data in them can be a pain. If you have more items than the portal displays, you have to scroll to the bottom of the portal to get to an empty row. This problem is worse when the portal is sorted. If you're entering data into a portal where the most recent entries are on top, your first reaction after making an entry is to click on the Enter key to see your info sort. But then, of course, you're thrown to the top of the portal and have to scroll down for the next entry. You can get around this by having users enter data into global fields, but this requires a script and an extra button click by the user.

This trick transforms the entry process. The user enters data into fields you can make appear much like the first record of the portal. When he finishes entering, the user can tab out of the field, click away, exit however he likes, and the data automatically appears in the portal while the entry fields are automatically blanked out, ready for another entry. Note: You can place the fields anywhere on the layout, and don't even need the portal to exist; a new related record is created every time a user enters data.

So, what's the trick? You create two relationships to the portal data. One relationship is the normal one that lets portal data be entered and displayed. The second relationship involves the entry fields, and must have the option "Allow Creation of Related Records" checked.

Some definitions:

'Normal' Relationship; fields: 'Link Field [Left]' &
  'Link Field [Right]'
'Entry' Relationship; fields: 'Entry Link [Left]' &
  'Entry Link [Right]'

The 'Entry Link [Left]' field of the 'Entry' relationship is a calculation field that uses the 'Normal' portal link field ('Link Field [Left]') as the first argument. The formulas presented here work as long as the key is one word (no spaces). You then concatenate a space and a unique identifier that also includes the status function, 'Status(CurrentTime)'. This calculation must have its storage options set to "Do Not Store.'! You can generate this unique identifier many ways, but this one works well:

Formula for 'Entry Link [Left]':
'Link Field [Left] & " " & Status(CurrentTime) &
  Status(CurrentDate) & " " & Random'.

Make sure the result is Text. Your goal is to prevent data from accidentally linking up.

Some of the standard ways to create unique links don't apply here. For example, fields such as Creation Date and Creation Time won't ever change for the header data, so using them to create the unique key won't help.

See http://www.semiotics.com/fmdisc.html for Lynn Allen's neat Base62 technique, which you can adapt for this trick.

The 'Entry Link [Right]' field (the right-hand side of the 'Entry' relationship) is a standard Text field.

By including the Status(CurrentTime) in the formula and not storing it, this key regenerates every second. If you put a field from this relationship on your layout and enter data, it generates a new record in the related file keyed to the exact second. When you finish entering data, time has marched on, the relationship has "broken," and the entry fields are ready for a new entry.

So, now you have a new record in the related file with orphaned data. How do you get it into the portal? That's the easy part: Simply set the link field of the normal portal relationship (the 'Link Field [Right]' field) to Auto-Enter the left word of the 'Entry Link [Right]' field. Voilá, your orphaned data is automatically linked and appears in the portal.


What do YOU think about this topic? Share your advice and thoughts using this form.

Your Name

REQUIRED : PUBLIC

Your E-Mail

REQUIRED : PRIVATE

Job, Company

OPTIONAL : PUBLIC

City, State, Country

OPTIONAL : PUBLIC

Your Web Site

OPTIONAL : PUBLIC

Your Comment

Please help everyone by keeping your comments on-topic, using clean language, and not defaming or making personal attacks.


Your e-mail address is required, but it will not be displayed to the public or given to anyone. See our Privacy Policy. Comments become visible after they pass our spam filter, and spammers and abusers are permanently blocked. Please report spam or abuse.

Printer-friendly
page layout

Keyword Tags: Database, Database Development, FileMaker, FileMaker Pro, FileMaker Users, Portals

ADVISORAMA
There's no better diet than eating only what you can afford.

ARTICLE INFO

FileMaker Advisor

Print Edition: February/March 2003, Page 42

SUBSCRIBER ONLY ARTICLE LOCKED

Subscribe to FileMaker Advisor Magazine

Read the advanced guide to creating custom business database solutions with FileMaker software. Subscribe now to gain access to all the archives and downloads.

FileMaker.Advisor.com

Subscribe to Advisor Basics of FileMaker Pro

Learn the fundamentals of using FileMaker Pro software. Every issue gives you step-by-step instructions on creating the databases you need. Subscribe now!

FileMaker.AdvisorBasics.com

Showcase Your Smarts

Submit your tips, techniques and advice and let Advisor promote your business and build your career. Show the world what you know!

AdvisorTips.com

Use of this or any other site, content, product or service of Advisor Media constitutes acceptance of Terms of Use.
Portions copyright ©1983-2008 Advisor Media, Inc. All Rights Reserved.
Reuse or reproduction of any portion or quantity of Advisor Media's copyrighted content, in any form, for any purpose, requires written permission.
ADVISOR®, the ADVISOR logo, and other names and logos that incorporate ADVISOR are registered trademarks, trademarks or service marks of Advisor Media, Inc. in the United States and/or other countries.
Other trademarks are used for identification, editorial or descriptive purposes and are the property of their owners.
Hosted by Prominic.NET Website powered by
LOTUS SOFTWARE
CUSIB50-01 posted 01/20/2003 modified 07/21/2008 03:40:33 AM ztfmfd/ztfmfd
domino-144.advisor.com my.advisor.com 07/23/2008 10:21:28 AM