3 Replies Latest reply on Jul 5, 2013 10:38 AM by TSGal

    Portals on iOS

    GFS

      Title

      Portals on iOS

      Post

           I'm having some buggy behavioiur with portals on iOS and I was wondering if there were any workarounds.

           I have a layout with 2 portals on it, both of which have scripts attached.  1 portal is of the same table and performs correctly.  The other is of a related table and does some weird things.  Basically, when I click it's button, sometimes it will appear to not run the script correctly and will jump the record back to the first one in the table.  Pretty annoying.  It appears to be an issue with the portal getting activated.  Once I get it to run one time, then it will be fine from then on ... until I go to another record or two then come come back and try again, at which time it may or may not work.

           Anyone seen this behaviour and if so any workarounds?

        • 1. Re: Portals on iOS
          TSGal

               GSymon:

               Thank you for your post.

               Your description doesn't provide enough information.  What does the script do?  Perhaps if you could post the script, and perhaps a screen shot that shows the result may give everyone a better understanding.

               TSGal
               FileMaker, Inc.

          • 2. Re: Portals on iOS
            GFS

                 Hi TSGal,

                 okay, here's my script.  Essentially it is working in a many-to-many situation where I am creating or deleting records in the join file.  These are then highlighted in the portal if there is a relationship.  (I had to make a the second If statement, because the portal is empty if there are no related records (even though it's a show-all) so this 'If' opens a new window and goes to the layout to make a new record.)

                 ______________________________________________

            Freeze Window

            Set Variable [ $$ItemID; Value:Items::ItemID ]
            Set Variable [ $$GroupID; Value:Groups showALL::GroupID ]
            Set Variable [ $ItemName; Value:Items::ItemName ]
            Set Field [ Groups::ItemGroupIDs_g; $$GroupID & $$ItemID ]
            If [ not IsEmpty ( FilterValues ( List (Items_Groups_join::ItemGroupIDs) ; Groups::ItemGroupIDs_g ) ) ]

               Go to Object [ Object Name: "ItemGroupsJoin-AddRemove" ]

              Go to Portal Row [ Select; First ]

               Delete Portal Row [ No dialog ]

              Go to Field [ ]

               Exit Script [ ]

            End If

            If [ IsEmpty ( FilterValues ( List (Groups::ItemGroupIDs_g) ; $$GroupID & $$ItemID)) ]
               New Window [ Style: Document; Close: “Yes”; Minimize: “Yes”; Maximize: “Yes”; Zoom Control Area: “Yes”; Resize: “Yes” ]

              Go to Layout [ “Items_Groups_join” (Items_Groups_join) ]
               New Record/Request
                                   Set Field
            [ Items_Groups_join::ItemID; $$ItemID ]
               Set Field [ Items_Groups_join::GroupID; $$GroupID ]
               Set Field [ Items_Groups_join::ItemName; $ItemName ]
               Set Field [ Items_Groups_join::ItemGroupIDs; $$GroupID & $$ItemID ]
               Close Window [ Current Window ]
               Exit Script [ ]

            End If

            Go to Object [ Object Name: "ItemGroupsJoin-AddRemove" ]

            Go to Portal Row [ Select; First ]

            Set Field [ Items_Groups_join forAddRemove::ItemID; $$ItemID ]
            Set Field [ Items_Groups_join forAddRemove::GroupID; $$GroupID ]
            Set Field [ Items_Groups_join forAddRemove::ItemName; $ItemName ]
            Set Field [ Items_Groups_join forAddRemove::ItemGroupIDs; $$GroupID & $$ItemID ]

            Go to Field [ ]

                  

            • 3. Re: Portals on iOS
              TSGal

                   GSymon:

                   Thank you for the script.  However, I'm still not sure where the script is failing.

                   How do the name of the tables relate.  Where is script failing?  In the first "If" construct?  In the second?  At the end?

                   If failing in the first "If" construct, are you able to verify the data is being filtered correctly?  Have you tried placing the filtered result in a field for viewing?  I'm assuming this works correctly in Pro but fails in Go.  Correct?

                   TSGal
                   FileMaker, Inc.