7 Replies Latest reply on Aug 26, 2016 1:20 PM by Imhest

    Better way to choose a value in portal row

    Imhest

      Hi there, my name is Lucas, I'm developing a Filemaker database to help in the office and I hope you can give me some advice on what to do about this.

       

      I have a portal in which i add inventory items to planes, it works great. Some items have a certain Serial Number that is unique from one another, and the user has to choose which one corresponds to the item used in the plane.

      ss (2016-08-25 at 07.50.04).png

      Thats the portal. The "13" in that last field would the the serial number (it's just a number that I added to try), it is a pop-up menu associated with a conditional value list.

       

      The thing that bothers me is that for the user to choose, he has to pick from this pop-up menu. It would be fine for a while but in the future there would be too many values and it will become bothersome, like in this:

      ss (2016-08-25 at 07.50.40).png

       

      Is there a way to, maybe, show a popup window with a list view and choose the desired number? I searched about using a popover with another portal inside but it seemed way too complicated for my limited programming knowledge, and the portal didn't seem to like it. Preferably, I would like to be able to order the numbers from newer to older too.

       

      If someone has any ideas or a good tutorial at hand it would be greatly appreciated! Thanks for the help!

        • 1. Re: Better way to choose a value in portal row
          jbrown

          Howdy

          there are certainly better ways to choose a value for the portal row. At a certain point those pop ups become wrong for choosing a value. You have to rely on something else.

           

          here is one way. It uses a list view like you suggest.  In my phone it is he's to write the minute details. Here is the overall idea:

           

          iin each portal row a button is placed. When pressed it captures the row # of the portal in a global field. You then go to the list layout ( in a new window ) you created of the choices and find those that meet the same criteria as your conditional value list ( the choices that are ok to pick from for this item)

           

          in this list each row has a button that captures the serial number of that row. Capture it in a variable inside the script.You then close that window and go to the portal row you were on (captured in that global field).

           

          then simply set the field of the row you're on with the serial number you captured in the variable.

           

          by the way these actions are done in scripts. Are you familiar with writing those?

           

          i have a demo file I whipped up but couldn't finish before I had to jet. I'll post it when I get home.

           

          For yourcscripts you'll use the function Get(ActivePortalRowNumber) and GoToPortalRow

           

          ill be glad to help out more when I get home

          jb

          • 2. Re: Better way to choose a value in portal row
            Imhest

            Hi Jeremy,

            Thank you very much for your detailed response!

             

            Yes, I'm familiar with scripts but never did something too complicated. I didn't know you could get the specific portal row number, that will be very helpful.

             

            I will take a look at the file you sent me and tell you how it went,

             

            Cheers,

            Lucas

            • 3. Re: Better way to choose a value in portal row
              David Moyer

              Hi,

              you want the function Get(ActivePortalRowNumber).

              (Sorry, I repeated Jeremy's note.)

              • 4. Re: Better way to choose a value in portal row
                Imhest

                Hi Jeremy,

                 

                I was able to adapt your code to my needs perfectly, the only thing that bothers me is the original window resizing when the new window opens. Any way to keep it as it is while I choose on the other window? Thanks!

                • 5. Re: Better way to choose a value in portal row
                  jbrown

                  Be sure the Adjust Window script step comes after the new window script step. In my demo, the original file doesn't seem to resize.

                  Try that. Let me know if it is still wonky.

                  • 6. Re: Better way to choose a value in portal row
                    jbrown

                    For fun, I included another way in the Companies_Popover layout. This uses, as you might guess, a popover instead of a separate window. I like this way better, and it really only has a few different script steps.

                     

                    This will eliminate the problem of the weird-resizing window and any other flashing you see.

                    • 7. Re: Better way to choose a value in portal row
                      Imhest

                      From what I've been able to investigate, the resizing happens because I'm on Windows and working with the original window maximized and, apparently, there is no solution for this that doesn't involve an external plugin. It happens in your demo too.

                       

                      I like the popover option better, it feels more intuitive and less disorienting, I think I'm gonna go with that.

                       

                      Thank you very much for your help! Have a great day!