Jump to content

PORTAL, FIRST LINE BLANK FOR NEW DATA


This topic is 2845 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Is it possible to have the first line in a portal blank for data entry, rather than scroll for the next blank line. If one were to have two years of data, who would care about seeing two years ago data always on the first line?

Link to comment
Share on other sites

Welcome to the forums Mike

No this is not possible directly. But this technique will achieve what you wish.

using hide object when on the contents of on main portal - and filter 1 row portal placed above,

you can format things to make it appear to be the "first" row.

Portal.fmp12.zip

when portals result in over a 100's of rows relatively useful data you may consider scripting their results to 'paginate' data 
scrolling more then a few times in a portal is not always the best user experience, or performant. 

  • Like 1
Link to comment
Share on other sites

Mr. West,

Thanks for the help, It did in a way help, but not completely as  your example does. What I am trying to do is to modify "Vehicle Tracker"(which can be found easily on the web) for the management of our small fleet of vehicles(30 or less). If you are so interested in this project, find it, download it and on the Vehicle Tracker layout, there is a portal for the management of maintenance records. I have edited/added some fields to suit our purposes. But the structure works, except that one has to scroll to the end of the maintenance records to enter new data. That is the reason for my original question. Your example does it the way it should be, I will continue to hack around and hopefully stumble into a solution, i'm half way there. New Quote: "Even a blind pig gets an acorn every now and again". More later.

Mike

Link to comment
Share on other sites

I am in real difficulty on this, I see no 'Filter" in your example, yours works the way I want mine to work with the most recent record on the first visable line. The data entered in the box with "enter data" in your example, drops the most recent entry to the bottom of the list and number 11 wont be seen. It is far better than my original that made you scroll for a blank line. please explain your comment about filtering the first line. Thanks, Mike

Link to comment
Share on other sites

Hi Mike,

The main portal is filtered to NOT show the blank row which is used normally to create new records.  Above the main portal is another one-row portal filtered to ONLY show the empty row (check the portal filters on both).  If you want the most recent entry to always be at the top, you need to create a timestamp field, maybe called CreationTimeStamp with auto-enter creation timestamp and then sort the main portal on this timestamp in descending order.

BTW, every table should automatically have CreationTimeStamp, ModificationTimeStamp, CreationAccount and ModificationAccount auto-enter fields.  I create a generic table with these fields, along with ID (which is auto-enter serial or Get ( UUID ) so they are easy to implement.

I should clarify ... if you are using an auto-enter serial number for the primary key in the child table then you could use it instead of the timestamp for your descending sort.

Edited by LaRetta
Link to comment
Share on other sites

Personally, I don't like portals where you can add data on a blank line. as you state, that line is always at the end of the portal for one (which isn't necessarily an issue with only a few records) and, more importantly, it's too easy to add unintentional data. I see that happening here all the time and as a result, I end up cleaning constantly. Well, that's what used to happen.

I prefer using a popover to edit and add data. Generally I'll create an "add" button which will create a new record, and open a popover using the new record. I have amended the Vehicle Tracker DB which you mentioned and attached it. I use a technique known as "Magic Key" for this https://filemakerhacks.com/2011/07/31/magic-key-and-check-box-reporting to create new records in a different table than associated with the layout, without changing layouts.

I agree with LaRetta's comments about the creation fields, however, in the Vehicle Tracker I have taken a shortcut and inverted the sorting of the Maintenance portal (which is done in the relationship). The Vehicle Tracker is missing quite a few standard fields, like ID fields, timestamp creation fields etc.

Vehicle Tracker.zip

Link to comment
Share on other sites

This topic is 2845 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.