13 Replies Latest reply on Feb 17, 2010 7:06 PM by disabled_uqkhurle

    IWP -- Portal Behavior - Can't Create New Records

    shudder

      Title

      IWP -- Portal Behavior - Can't Create New Records

      Post

      When working with portals in FM10 (or any previous rev that had the ability to create portals to other tables) you are shown an "empty" portal record.  Until you click in a field and enter data into it, there is no record made in the related table.  Once you do add data, you are then presented another "empty" record below the one you are entering data into.  And to create your next record you just click into the "empty" record and begin entering data.  Works a charm.

       

      However, this is not the case with IWP.  I have found that when viewed on the web, there is not any "empty" record shown in the portal, so there is nothing for the user to click into and start entering data.

       

      So, how do you create a record in a portal via the web?

       

      Seems like I am just missing something, but creating a button to create a new record and placing it into the portal creates a new record in the main table, not the portal.  Also, Go to Portal Row [Next] doesn't work to create a new record either (it doesn't do anything, of course)..

       

      I know I could create a button that takes the user over to another layout (for the related table) where a new record could be created, etc. etc., but that seems overly complex.  And really, I should be able to create a portal row right there in the portal, right?

       

      This is from p. 29 from the fm10_instant_web_publish_en.pdf doc:

       

      Web users can create and edit portal records. To delete a portal record, you must provide a scripted button that selects the appropriate portal record, then deletes it. 

       

      Thanks for any help.

       

      - Michael 

        • 1. Re: IWP -- Portal Behavior - Can't Create New Records
          ninja
            

          Howdy Michael,

           

          Is it the IWP or the Dbase relationship?

           

          Have you verified that the box "Allow creation of records via this relationship" is checked?

           

          File>Manage>Dbase>Relationships>  doubleclick on the [=] box of the appropriate relationship.

          • 2. Re: IWP -- Portal Behavior - Can't Create New Records
            shudder
              

            Heya Ninja --

             

            All's well on that end: In native FM10, things work as stated in my top paragraph -- everything works normally, and as one would expect.  It's only via IWP where the "empty" portal row doesn't show up, so there is nothing to click into, thus web users cannot create a record in the portal (even though the support doc says I should be able to do this).

             

            Ideas? 

             

            - Michael 

            • 3. Re: IWP -- Portal Behavior - Can't Create New Records
              DLW-BPEX
                

              Michael,

              What happens if you click into the last row containing data?

              Does a new empty row show up then?

               

              David

               

              (In re-reading your post, it sounds as though you cannot BEGIN to enter data. Correct? If so, my reply is pointless. But FYI, it does seem that if a portal contains data, in IWP you must click in a populated row in order for the new empty row to appear.) 

              • 4. Re: IWP -- Portal Behavior - Can't Create New Records
                shudder
                  

                Hi David --

                 

                When in native FM10 -- and no data is in the portal -- I see the "empty" portal record (it's not actually a record yet as you know, it's just an empty interface -- I've always hated this about FM, that a 'blank' record shows up in portals, but that's a different issue...).  I can click into it and enter data, and when I do, the second "empty" record in the portal shows up, as per normal, ready for my next portal record entry.

                 

                When viewing the same empty portal in a browser via IWP, there is *nothing* in the portal, so nothing to click on at all.  That's the trouble: How can I then create a portal record via the web without utilizing that "empty" interface?

                 

                When I have a populated portal record that is committed into the system (I can do this from the native app, of course), no second "empty" record appears, so web users can only effect changes on the one portal record and cannot create another portal record.

                 

                Cappiche?

                 

                - Michael 

                • 5. Re: IWP -- Portal Behavior - Can't Create New Records
                  DLW-BPEX
                    

                  Michael,

                  I can confirm it with one of my own db's created in FMP 10 Advanced, when using IWP in both Firefox and Safari on Mac OS X.

                  Oddly, I never noticed it before (but this db is still in development, and the portal contained test data when the file was first opened in IWP). I also don't believe this was the case with a similar setup for another solution created awhile back in FMP 9 Advanced, but I cannot verify that now.

                   

                  I imagine it has something to do with the portal having focus or not, but...

                   

                  However, your last sentence does not agree with what I see: In a portal that has data, I *do* get an empty row ready to receive data. 

                   

                  Hmm. I will investigate further and post any revelations.

                  David 

                  • 6. Re: IWP -- Portal Behavior - Can't Create New Records
                    shudder
                      

                    Well, good (in a manner of speaking).  Then I am not crazy.  Well... :smileysurprised: 

                     

                    Hm... wait a sec.

                     

                    This is interesting... jumping off your "portal having focus" comment, I tried all over again to get this to work (or not work as the case may be), and lo and behold it does seem to work, but the IWP view on the record is throwing an anomaly at me I wasn't expecting: The entire record itself (that has the portal within it) must first have focus, and then the "empty" portal record shows up and I can populate it.  

                     

                    IOW, if I am just flipping through records and clicking on the entirely empty portal, I see nothing and can't get in to the portal at all, and the record never gains focus because I never clicked into a field.  However, if I first click on ANY field in the main record (so the record itself gains focus) the "empty" portal then shows up and I can populate it.  Wow.

                     

                     I can then hit the Submit button in the IWP view and the record is committed.  I am then shown just the one portal record, and no "empty" portal record below it... until I once again clicked into a field in main record, and then the second "empty" portal record shows up.  Wow wow.

                     

                    I guess this is expected behavior, but it certainly threw me for a loop.

                     

                    So, I think this is resolved now???

                     

                    - Michael

                    • 7. Re: IWP -- Portal Behavior - Can't Create New Records
                      DLW-BPEX
                        

                      Well... sorta, kinda.

                      I was thinking along that same line, but two things still bother me:

                       

                      1. If a portal is populated with some data, clicking into one of its rows gives focus to the main record (as you say) and hence the portal -- producing the empty row to receive data. Why, then, is that not what you are seeing?

                      2. More troubling, though:  The layout on which my portal sits includes no other enterable fields (I don't want the user changing data in those fields on that particular layout). In such a case, nothing on that layout can be selected in order to establish focus. So if the portal is fresh and empty, the user is stuck; the portal is inaccessible.

                       

                      Seems like a bug to me. Or at the very least, something to be aware of.

                      • 8. Re: IWP -- Portal Behavior - Can't Create New Records
                        shudder
                          

                        Hi David --

                         

                        1. If a portal is populated with some data, clicking into one of its rows gives focus to the main record (as you say) and hence the portal -- producing the empty row to receive data. Why, then, is that not what you are seeing?

                         

                        I had been attempting to click down in the empty area below the last real, populated portal record, so the record never got focus at all because I never actually entered the record (either the main record or the portal record -- I was clicking on non-field space so far as IWP is concerned).  I am finding now that if I first click on any portal row above the empty space, I then get an "empty" portal record, ready for data input (and, yes, I can at that point enter a cursor into the "empty" record and start populating it).

                         

                        2. More troubling, though:  The layout on which my portal sits includes no other enterable fields (I don't want the user changing data in those fields on that particular layout). In such a case, nothing on that layout can be selected in order to establish focus. So if the portal is fresh and empty, the user is stuck; the portal is inaccessible.

                         

                        There may be a way around this: Consider scripting it such that when the user is taken to that portal-only layout, that you first take them to a field in your main table (not the related one) on the current layout  that is set to 1 pixel by 1 pixel in size and is placed in some hidden place in the UI.  This should give focus to the record, and then reveal the "empty" portal record, ready for input.  You might have to think this through a bit -- like making that fakey field a global, but not allow any data to be entered into it (that's okay though -- you are utilizing this global just to give focus to the current main table record so that the portal record shows up).  Make any sense?

                         

                        IWP is definitely a headache to deal with.

                         

                        - Michael 

                        • 9. Re: IWP -- Portal Behavior - Can't Create New Records
                          DLW-BPEX
                            

                          Michael,

                           

                          Regarding #1: Good. At least we know it behaves consistently.

                           

                          Regarding #2: Yes, that trick will work. It is still a bit concerning, though, that for any solution headed for IWP the developer needs to (a) get into the habit of always jumping through that hoop, (b) remember to do it whenever a layout will contain no enterable fields except the portal, or (c) make sure the layout includes at least one obviously enterable legitimate field.

                           

                          And regarding IWP: Yes, it is. In fact, I have a little Elmer-Fuddish saying for IWP: "It's Wery-wery Painful."

                           

                          David 

                          • 10. Re: IWP -- Portal Behavior - Can't Create New Records
                            philmodjunk
                              

                            Using IWP can feel like "tap dancing in a phone booth". It can be done, but you have all these "cool moves" that just won't work with IWP like they can with Filemaker Clients. :smileywink:

                            • 11. Re: IWP -- Portal Behavior - Can't Create New Records
                              shudder
                                

                              ...and I am going to have to be VERY clear with my clients about the anomalies they may experience.  Whew.  Thanks, Phil.

                               

                              - Michael 

                              • 12. Re: IWP -- Portal Behavior - Can't Create New Records
                                shudder
                                  

                                David -- PM sent 

                                • 13. Re: IWP -- Portal Behavior - Can't Create New Records
                                    

                                  To Phil, Michael and David, thank you so much for tackling this one.  I thought I was going insane!

                                   

                                  To add to this, I also found that when the user (using IWP) changed tabs, sometimes (though not always and not always on the same tab) a message "Field "" cannot be found" would come up. 

                                   

                                  In the end I hid the tabs (making them 1pt) and put in buttons across the top that a) entered a global  field as suggested to create a "new" record in the portal and b) go to object with the tab being the object.  Only way I could consistently have a user swap around between tabs to either edit or create new information within them.

                                   

                                  thanks so much for your help guys.

                                  Karen