8 Replies Latest reply on Feb 2, 2010 12:15 PM by LeoB

    Button display in portal

    LeoB

      Title

      Button display in portal

      Post

      On one layout I have a portal that displays only certain fields from records in a related table.  Works fine.

       

      I added a button to that portal that takes the user to the specific related record summarized on the line (for updating).  Works fine.  I have a separate button outside the portal set to a script that allows the user to create a new record in the other table tied to the first table.  Works fine.

       

      However, the empty lines in the portal all show the button text (Go to details), which doesn't look right to me.  Some records in the first layout have 10 or so related records in the portal, but some only have one or two.  On those with one or two, the portal shows all the empty lines with the button text displayed.

       

      I guess I could try and use conditional formatting (which I've never used), but would just like that button not to display on empty portal lines.

       

      Anybody know how to do this?

       

      Thanks

        • 1. Re: Button display in portal
          ninja
            

          Howdy LeoB,

           

          I just mocked this up and cannot replicate what you are seeing.

           

          I made a portal into a related table, put text into the portal row and colored the text box.

          I linked a script to the colored text box (button).

           

          I see that, when child records cannot be made through the relationship, the button appears in portal rows corresponding to related records.

           

          I see that, when child records CAN be made through the relationship, the button appears in portal rows with related records plus one empty row at the bottom.

           

          Did you check to see if your text box (or group) making up your button is wholly within the portal row?  I'm not sure how this would make a significant difference, but have noticed some weirdness when you have objects overlap portal boundaries.

          • 2. Re: Button display in portal
            LeoB
              

            Hi, Ninja:

             

            Well, I deleted the original portal, closed the file, restarted FMP 10 Adv, and recreated the portal entirely.  All the portal fields are set to NOT allow new records to be made from within the portal (except the button, of course).

             

            I also resized the button to insure that it is entirely within the portal field lines.

             

            Now I only get the errant button displayed on the FIRST empty line.  Clicking on the button does nothing, because there's no related record to go to.

             

            Later when I get back I'll post a jpg of it...gotta run to a meeting.

             

            Thanks

             

             

            • 3. Re: Button display in portal
              ninja
                

              Howdy LeoB,

               

              Another thing to check before bothering with a screen shot is whether or not extra blank records exist in the related table.  GTRR is a powerful tool, but can have unexpected consequences when not used *perfectly*.  One common side effect is unwanted creation of blank records...particularly when you are using GTRR to create records in a related table.

               

              Jot down the linking ID on the parent table, go to a layout based on the child table, perform a find for that ID.  Verify that when two records show up in your portal that there are actually two matching records in the child table...not 2 records with data and 47 without data.

               

              Blank records in your child table could very well cause what you are describing.

              • 4. Re: Button display in portal
                philmodjunk
                  

                To expand on Ninja's caution on GTRR:

                 

                Go To Related Records is a very useful tool, but which is very poorly documented. To learn more about GTRR, click the following link:

                The Complete Go To Related Record

                • 5. Re: Button display in portal
                  LeoB
                    

                  Phil:

                   

                   I had already found and read that post about GTRR.  I don't think any of those anomalies apply here, though.  The buttons work perfectly.

                   

                  Ninja:

                   

                  I checked the child table closely, and there are no empty records.  I only have three records in the parent table and 13 in the child table.  All the buttons map correctly to the corresponding record in the child table, and vice versa (back from the child table to the parent table).

                   

                  All three records in the parent table exhibit the same blank record at the end, but showing the button.  The button does not work on those blank lines.  Clicking it does nothing, and there's no error indication.

                   

                  Here's a shot of the portal from one record.  The other two records in the parent table look just like that, but with different numbers of records in the portal.

                   

                  http://i46.tinypic.com/2nqu1j9.jpg

                   

                  Thanks

                  • 6. Re: Button display in portal
                    ninja
                      

                    LeoB,

                     

                    We're chasing a figment.  That's exactly what it SHOULD look like.  The only way to lose the bottom button on the blank line is to prohibit new records from being created in the child table through the portal.

                    • 7. Re: Button display in portal
                      philmodjunk
                        

                      I wondered earlier if that was what we were looking at here, but you earlier said blank rows and that had me thinking you were seeing more than one blank row in the portal.

                       

                      What I do with that bottom row button, is use conditional formatting to specify a grey text color for the button's label text if the portal's key field is empty. (It'll only be empty on this bottom row.) That gives it a "disabled" look to signal the user that nothing will happen if they click it.

                      • 8. Re: Button display in portal
                        LeoB
                          

                        You got it!  I specifically did NOT want the user to enter new records in the child table via the portal; there's a separate button outside the portal to do that.  The child table requires much more data for a complete record; the portal in the parent table is just there so the user can quickly see what issues are open or closed.

                         

                        I did not realize that in the relationship the box for creating new records via the relationship was ticked.  I don't know why I would have done that, but my mistake  started me on this thread.

                         

                        I knew it had to have been something I did (wrong).

                         

                        Thanks.