4 Replies Latest reply on Feb 2, 2016 1:09 AM by onefish

    portal create new


      Hi, If I sort the portal to were I the latest is always on top it works like I want it to, My question is if i want to create a new record in that portal I have to scroll to the very bottom and click in the field box where I enter data, can this be done without having to scroll to the bottom of the page?


      Thanks, Toby

        • 1. Re: portal create new

          Toby, sounds like you're talking about the new record portal at the end of your portal list being at the top instead of at the bottom? There's no option in Filemaker to do that but you can get the same effect by using 2 different portals with the top one being only 1 row high and the bottom portal showing all your related records.

          1. Create a calculation field in your child table, we'll call it ChildIDcalc here. Basically what you need to achieve is that the calculation field = the child relationship ID up to the point when you are done entering data into the new record. I'm not familiar with your database so I can't say exactly the best way to achieve this. The safest way is to simply use If (IsEmpty(YourField1) and IsEmpty(YourField2) and IsEmpty(YourField3) [.....and so on] ; YourChildRelationshipID ; "")
          2. Create a second instance of the child table and create a relationship between the parent table and the new child table instance where, YourParentRelationshipID = ChildIDcalc. Enable creation of portal records in the child table through this relationship.
          3. Open the relationship for your existing portal and uncheck allow creation of records.
          4. Go to your parent table layout and create a new single row portal just above the existing portal with records from the relationship you just created. Add, size and format the portal fields as per the portal below.


          Now you should be able to create a new record in the new portal and as soon as the data in the fields meets the conditions of the ChildIDcalc field, the relationship will be broken and you can enter another new one. As the relationship in the bottom portal is unaffected by any of this each new record should be sorted according to your prescribed sort order.


          I haven't done this for about 11 years and I'm just typing this out from memory so forgive me if I've left anything out. I know it works though as I used to use this concept way back then.

          • 2. Re: portal create new

            There are a couple of techniques you could implement here, but a quick and easy way would be to have a button near the portal for creating a new related record and have that button go to portal row last.

            • 3. Re: portal create new
              Fahri Akar

              Duplicate your portal. Filter the second one to show only the empty record. Then put it anywhere you want.

              Filter it like:

              IsEmpty ( portal_relationship::id )

              • 4. Re: portal create new

                Ahh, I gotta catch up! Never used to have filters in portal setup. That is much simpler