8 Replies Latest reply on Nov 24, 2016 9:04 AM by justinc

    Overcome blank line in portal

    rudydimaggio

      I learned that I can hide the blank line at the bottom of a portal by inhibiting the creation of new records in portal (on portal settings) and put a button on the line.

      But, if the portal is empty, the button itself is not visible. How to overcome this problem?

      Thanks

       

      Filemaker 15 advanced on MacBookPro

        • 1. Re: Overcome blank line in portal
          justinc

          What does this 'button' do?  Why do you need to show a button?

           

          I believe what you want to do is to enable the portal's 'create new records' ability, but just hide all of the fields on that portal row and instead show the button.  If the Fields on the 'create new record' portal row are hidden, the user will still be unable to create new records, but then you can show the button instead.  (Not sure what this button does...)

           

          So use Hide conditions:

           

          if (isempty (relatedTable::ID) )         //This will hide the fields

           

          if ( not isempty ( relatedTable::ID )  )      //This will hide the button on rows with data, but show it on the empty row.

          1 of 1 people found this helpful
          • 2. Re: Overcome blank line in portal
            erolst

            Rodolfo Di Maggio wrote:

             

            I learned that I can hide the blank line at the bottom of a portal by inhibiting the creation of new records in portal (on portal settings) [...]

            Actually, that setting is in the relationship definition itself.

             

            Rodolfo Di Maggio wrote:

            [...] and put a button on the line.

            But, if the portal is empty, the button itself is not visible. How to overcome this problem?

            Place the button outside the portal.

             

            I'm assuming this is a New Related Record button with a script that creates a new record in the portal table, then returns to the layout and the portal. You don't want to have that button in every portal row anyway; it is not dependent on any related data, and may become irritating.

            • 3. Re: Overcome blank line in portal
              philmodjunk

              A button to add a new portal record should not be located inside the portal row. Put it outside the portal--I usually locate one at the top right corner--often it's a popover button so that you can enter data and create the new record all in one action.

              • 4. Re: Overcome blank line in portal
                rudydimaggio

                Thank you, that's what I needed !!! :-))

                • 5. Re: Overcome blank line in portal
                  rudydimaggio

                  Thanks, another useful solution, and I can also conditionally format the button to make it disappear if the portal is populated with records. :-)))

                  • 6. Re: Overcome blank line in portal
                    rudydimaggio

                    Thanks, another useful solution, and I can also conditionally format the button to make it disappear if the portal is populated with records. :-)))

                    • 7. Re: Overcome blank line in portal
                      rudydimaggio

                      My heartily thanks !

                      Your advice is wonderful!

                      I tested it and it works

                      and, also, I created TWO buttons, one with a "DEL" instruction to delete portal row and another one with "NEW" instructions to create a portal row,

                      Since they reciprocally exclude each other, I used the proper HIDE instructions, as you suggested and then put one button in top of the other and Grouped the two in ONE.

                      And it works indeed, when there is a portal row the DEL button shows, but not the other, and when the portal row is empty only the NEW button shows up.

                      Really you were very helpful.. and I saved portal space too.

                      Hope to be able to reciprocate the courtesy one day or another ;.)

                      Thanks again

                      Rudy

                      1 of 1 people found this helpful
                      • 8. Re: Overcome blank line in portal
                        justinc

                        Specifically for the way the portal and buttons are arranged, I would agree with Phil:  typically a button for creating a record would exist outside the portal in a fixed location; a button for deleting a portal row is OK on each row, though.  If you put the 'Create' button in the portal row, then it's possible the button could be hidden off the edge of the portal.

                         

                        And again as they were pointing out, the 'Allow creation of records...' setting is on the relationship, not the portal itself.