1 2 Previous Next 23 Replies Latest reply on Mar 10, 2017 9:51 AM by xxx202xxx

    How to make a portal multi-user friendly

    WBullard

      You really feel slow when you come across something that is important like portals and making them multi-user friendly, but when you search about this issue you come up with nothing. It's like trying to spell a word so badly that spell check can't even help out. What does everyone else know that I seemed to have missed?

       

      The issue is editing a record in a portal appears to lock the parent record so no one else can edit a different portal record at the same time. The kludge fix is to pop up a window when the user clicks on a poral row and have them edit in the popup. That keeps from opening the portal record, but is a very unsatisfying user experience.

       

      Seems like the fix will be based on the using the user's unique account name. If anyone could point me in the right direction here, I'd be much obliged.

       

      Thanks,

      Will

        • 1. Re: How to make a portal multi-user friendly
          CarstenLevin

          Question: Your parent record, is this the same for all users or is it one among many.

          If it is the samen for all/many users, you could make it a session window with global values being set on opening and thereby not blocking any record for other users ... and then have the portals you need.

           

          But explain a little bit more and maybe some better suggestions migth turn up.

          • 2. Re: How to make a portal multi-user friendly
            WBullard

            For discussion sake, the parent record is invoices and the portal is based on invoice line items. So I assume the answer is one among many.

             

            When the user selects the desired invoice from a list view, then the invoice record number is set to a global and the user is taken to the layout with the invoice line items portal. Then when two people want to modify these line items for the same invoice the locking occurrs.

             

            I'm thinking that one solution would be to set the context of the layout with the portal to the user table. I could do a find on the active user, and create a global in the user table to hold the invoice record ID and that should work. The problem with that would be that there a dozens of relationships already developed between Invoices and Invoice Line Items that I'd have to copy to the User's table. Plus there are dozens and dozens of other script changes that would be required.

             

            I was hoping there was a more elegant solution. Do you have a idea what that might be?

             

            Thanks,

            Will

            • 3. Re: How to make a portal multi-user friendly
              woytovich

              IMO the best solution is the pop-up... and do not agree that that interface is anything less elegant or satisfying. In fact I would argue the opposite. I shy away from edition in portal rows for this and other reasons.

               

              Mark

              • 4. Re: How to make a portal multi-user friendly
                WBullard

                And your users would probably agree with you. I probably need to be more open minded about interface options. Thanks for your input.

                • 5. Re: How to make a portal multi-user friendly
                  jose@solutionscay.com

                  Hello Will,

                   

                  If you properly size and center the pop up window, hide the status toolbar, and pause so the user can't close it until they click a save button, it's an elegant solution

                   

                  Otherwise, without proper control, it is indeed kludgy.

                   

                  Best,

                   

                  Jose

                  • 6. Re: How to make a portal multi-user friendly
                    Stephen Huston

                    If the locking is happening only if multiple clients try to edit the same invoice at the same, isn't that a good thing?

                     

                    I would still consider an Invoice as a form of single record, and I would both expect and welcome record locking during those edits. Can you explain when you would want two clients to edit the same invoice at the same time?

                    • 7. Re: How to make a portal multi-user friendly
                      WBullard

                      Hi Stephen,

                      The issue isn't editing the invoices but the invoice line items that appear in a portal. And I was using invoices and invoice line items for discussion purposes. In reality the parent record is Projects and the child records in the portal are Properties. The work flow is such that there are many times more than one person could be working on the same Project but different Properties.

                       

                      The solution I came up with so more than one user can use the same portal at the same time is to use an "On Entry" trigger to call a Open Record/Request. If an error results, then I pop up a new window with the context set to the child table. The user can do the editing of the child record in the popup.  If an error doesn't result then the user can continue to edit the child record in the portal just like always.

                       

                      The works fine except when two users are trying to edit the same properity. In that case I have a OnKeyStroke trigger to again test Open Record/Request so the user will know that the particular record they want to edit is already open.

                       

                      This solution isn't what I'd call elegant, but for the 75% of the time that only one person will be accessing a project, then they can continue to work in the portal as always. In the 25% of the time there are two users then one of them will have to deal with the pop-up.

                       

                      It has been years since I took a database programming class (does it show?) but from what I read years ago the correct way to develop a multiuser application, even in FMP, is to always set the first table to the user table then link tables from there. If someone who is familar with this technique could elaborate on it, that would be great.

                       

                      Thanks,
                      Will

                      • 8. Re: How to make a portal multi-user friendly
                        paulspafford

                        Hey Will,

                         

                        So sometimes when your user clicks in the portal line they can enter data there, but sometimes it takes them to a pop-up window?

                         

                        It may be better to just have them always use the pop-up window, so you don't leave them wondering why they are sometimes entering data in different ways. The learning curve is much easier if the data entry always happens in the same way.

                         

                        Paul

                         

                         

                         

                        --

                        Paul Spafford

                        FileMaker Database Superhero,

                        Spafford Data Solutions

                         

                        Tel: 613 838 9956

                        www.paulspafford.com

                        www.ottawafilemakerdeveloper.com

                        www.fmlayoutmode.com

                        www.fmscripts.com

                         

                        FileMaker User Group in Ottawa:

                        www.meetup.com/fudgeo

                        • 9. Re: How to make a portal multi-user friendly
                          jormond

                          If you can work it within you layout setup, a layout based on LineItems table with a found set just for that one invoice, could be a little easier to work with.  Use the Header and Footer (and even sub-summaries) to display the related Invoice record data, and the body as a List View with the properties.  That way you don't need all the script triggers, or at least as many, to give the user experience you are looking for.

                           

                          You may still need to adjust scripts and such to point to the local table, but in the long run may be easier to manage.

                           

                          And I agree with Paul, consistency in the UI is very important.  Especially if you have users that become very efficient with the data entry and touch-typing...different UI flows for unexpected reasons can be frustrating for the user.  It's necessary at times, but I've used a few systems that made me pull out my hair because I didn't know what it was going to do next.

                          • 10. Re: How to make a portal multi-user friendly
                            martinbrewer

                            Will, not sure if this is related or not, but...

                            I created a solution with a GUI file and a Datafile with all the interface in the GUI, and used portals to show search (by relationship) results.

                            I had an issue when the system went multi-user, that records were frequently getting locked, although I'm sure people weren't accessing the same records?!

                            I found a fix, but not really the cause but it sounds similar to your problem.

                            The solution was to create a new record in the GUI every time someone logged in and hey presto the problem went away.

                            Becaue all the fileds in the GUI were global, I really couldn't figure this one out, but at least I stumbled upon an answer.

                            The only problem is I now have to run a server-side script to delete all but one of these records every morning otherwise the build up is slows the system right down.

                             

                            Does this sound like it might be similar?

                            • 11. Re: How to make a portal multi-user friendly
                              WBullard

                              Hi Paul. I've thought about that and you are probably correct. Thanks.

                              • 12. Re: How to make a portal multi-user friendly
                                WBullard

                                Hi Josh. I inherited a database laden with protals. But it now seems that relationships are slower than list views and finds. Our new development is based on list views and headers like you mention. We'll have the occassional portal, but not a portal centric UI like we've had in the past. As we go more toward WAN applications this should provide better speed. Thanks.

                                • 13. Re: How to make a portal multi-user friendly
                                  WBullard

                                  Hi Martin. You had the same problem I had in your portal. If a user edits one record in the portal, then no other user can edit a row in that portal if they are both on the same parent record. I've been programming in FMP for a couple of years and felt like a complete idiot when I discovered this last week. I thought about implementing something like you did and delete the temporary records when they exited the program, or with a server script, but I chose to go instead with the solution described above. Thanks.

                                  • 14. Re: How to make a portal multi-user friendly
                                    paulspafford

                                    Hey Martin,

                                     

                                    Instead of using a session table like this, I like to use a User table. You create a record that holds the user's Account Name. When they open the file, your onOpen script searches for their user record, and that is used for all the portal relationships.

                                     

                                    Paul

                                     

                                     

                                     

                                    --

                                    Paul Spafford

                                    FileMaker Database Superhero,

                                    Spafford Data Solutions

                                     

                                    Tel: 613 838 9956

                                    www.paulspafford.com

                                    www.ottawafilemakerdeveloper.com

                                    www.fmlayoutmode.com

                                    www.fmscripts.com

                                     

                                    FileMaker User Group in Ottawa:

                                    www.meetup.com/fudgeo

                                    1 2 Previous Next