Jump to content
Mike Kelly

PORTAL, FIRST LINE BLANK FOR NEW DATA

Recommended Posts

Mike Kelly    0

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?

Share this post


Link to post
Share on other sites
Ocean West    104

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

Share this post


Link to post
Share on other sites
Mike Kelly    0

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

Share this post


Link to post
Share on other sites
Mike Kelly    0

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

Share this post


Link to post
Share on other sites
LaRetta    479

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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


  • Similar Content

    • By Bilbo
      Hello everyone,
       
      I have found a stange behaviour with filemaker. I have two tables linked by a third one. I want to navigate using the portal. But if I use a script on layout exit, then the behaviour is abnormal.
      Please have a look at the enclosed database and try normal, then abnormal layout.
      Please tell me if you consider that it is a bug or not. If it is a bug, should I report it to Filemaker Inc. and how?
       
      Thanks for your help,
      Regards
      Possible bug.fmp12
    • By jpons
      Hello,
      I am back to working in FMP after a multi-year hiatus, and I am rusty and am currently stuck. Hoping someone can point me in the right direction. I hope I am posting in the right topic.
      I am building a solution where we have a number of many-to-many relationships that are being used via portals.
      This is the issue that I am having that I am stumped on.
      In this instance I have the following db graph:
      Workshops <--=--> WorkshopStaff <--=--> Staff
      Each workshops may have multiple Staff and Staff may participate in Multiple workshops
      On the Workshops layout I have a portal to WorkshopsStaff
      In order to add Staff to the Workshop I have a button that brings up a popover with a portal that lists all Staff from which to select. I can select a Staff Member and they get added to the WorkshopStaff table.
      This popover was more or less modeled on the "invoices" starter solution
      The way I am displaying the portal inside the popover is via a table occurrence like this:
      Staff <--X--> StaffList (Cartesian relationship)
      My issue is that the portal in the popover (the result of the cartesian relationship) displays and works as intended as long as I have one related entry in the WorkshopClient table.
      But for a new Workshop for which I don't yet have any entries in the WorkshopClient table the portal in my popover comes up empty.
      What I am doing wrong or is there a better way to populate the list from which to select staff?
      Thanks a bunch.
      -J
    • By Karlos Fandango
      My database has only three tables...
      ITEMS - Which is an inventory of tools for the company.
          • BOOKED - Which records an audit of each time each item is booked in or out of the stores
          • TESTED - Which records an audit of each time an electrical tool is PAT tested [safe to use]
      The individual Items are displayed in a list layout called 'Item List' which is basically the 'Home Page'.
      The BOOKED events are displayed in a portal in a 'form layout' called 'Item Booking'. I've set the sort order in the portal to show the last 'booking' at the top. The easiest way to this portal is to click the small blue "go" icon in record on the "Item Bookings" layout.
      What I have tried to do is display the last "booking location" from the portal [at the top] in the 'Item List] so that at we can see the item's current location without having to view the portal each and every time. I managed to display the latest Booking Primary Key - [Max ( Booked::Book_Pk )] - but couldn't get it to reveal where it was last booked too.
      I shall spare you the list of things I have tried but before giving up completely thought to seek help here where I received helped before. Personally, I thought an auto entry by calculation would have been best but I just couldn't figure it out.
      Please find the file attached.
      Any help would greatly be appreciated.
      I have FileMaker 13 on my Mac at home but V15 elsewhere, if you alter the file please export in V13 to spare me having to leave the house to open it up on the other computer [V15].
       
      Test-23.fmp12
    • By Gunther Stern
      I am so frustrated after two solid days of working on this really simple join table example.  I am trying to create a little iphone application in which I can quickly track my homeless outreach contacts on the fly.  I have been so frustrated.  I made a lot of progress at one point by just deleting the portal and starting over.  I attached two databases, test which works just the way it is supposed to.  A simple widget model based on something I saw on youtube.  and Client test which is my attempt.  Test works fine.  Client test is very similar with a couple of extra fields including a calculated full name field but nothing significantly different.  Right now the problem is the relationship will not create a new record in the join table.  Maybe I don't even need a join table.  Not sure but the join table was one of my attempts at a solution.  I have been using filemaker since 6 but only sporadically.  I used to be able to create simple solutions on the fly but I just spent the whole weekend trying to get this to work.  I don't have any hair left to pull out!  Help! 
      test.fmp12
      NewClientTest.fmp12
    • By Smiley
      Hi
      i have an event table and a coordinator table. Until now each event had only one coordinator. There has now become a need that at some large events require more coordinators - could be upto 5.
      I have a login for the coordinators where they could see events which are assigned to them.
      The relationship is that the cordinatorID in the coordinator table matches the coordinatorIDF in the event table.
      I created a coordinator2IDF in the event table and tried to relate it aswell to the coordinator table but what happens that it even breaks the first relationship.
      How could i modify my table it should work like that with my already created table which was until now a one to one relationship?
      i would appreciate if someone could help me out on this...
×

Important Information

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