7 Replies Latest reply on Jan 25, 2013 8:49 AM by johnswhitehead_1

    Strange date error in IWP

    johnswhitehead_1

      Title

      Strange date error in IWP

      Post

           I am seeing some bizarre behaviour in a database accessed via IWP that doesn't happen when the same db is accessed via Filemaker.

           The layout in question has a portal that lists the sessions at an event. The portal is filtered to show a subset of the related records. Two buttons on each row of the portal allow the user either to Reserve a place for the session or Cancel a previous reservation. When used in IWP any attempt to use either button throws up an error message:

            

           "Data Entry Error:
            
           Your attempt to save changes to the current record or request failed because of the following:
            
           Invalid date value in field "SessionDate.""
            
           Needless to say, there is nothing wrong with the date: the Filemaker version is quite happy with it.
            
           The IWP version will stop throwing up the error under two circumstances. First, if I search for invalid dates in the field using the ? character it finds none but thereafter one can edit using the buttons (weird when you think about it). This remains the case until you change the portal filter, when the problem returns.
            
           The second method is to turn off the portal filtering altogether, and the problem disappears.
            
           So the problem appears to be something to do with portal filtering. The field on which I'm filtering has nothing directly to do with the SessionDate field that's ostensibly causing the problem (it's not a date, and it lives in a different, though obviously related, table).
            
           Any clues? Thanks in advance.

        • 1. Re: Strange date error in IWP
          philmodjunk

               By "change the filter" do you mean modifying a value referenced in the filter expression?

          • 2. Re: Strange date error in IWP
            johnswhitehead_1

                 Yes, a different portal on the same layout offers the options to filter the main portal for different values. 

                 Thanks for your interest.

            • 3. Re: Strange date error in IWP
              philmodjunk

                   A web browser does not exchange data with the hosted database as frequently as does a FileMaker Pro client application. If you are using buttons in that portal to perform scripts that modify the fields referenced in the filter expression, include a commit records step to submit the changed data back to the database.

                   If you are using script triggers on your layout, be advised that you cannot directly "trip" a script trigger from a Web browser client.

              • 4. Re: Strange date error in IWP
                johnswhitehead_1

                     Thanks for the suggestion -- alas, it didn't work. But in checking it out I made an accidental discovery: that the privilege set in use affects the outcome. If I log in as admin I get the problem. If I log in as a regular user with a fairly restricted set of rights, it works just fine. That is to say, it's the opposite of the normal problem one encounters with security settings.

                     I shall investigate this in detail tomorrow and see if I can find an explanation...

                     I'm grateful for your assistance.

                • 5. Re: Strange date error in IWP
                  johnswhitehead_1

                       OK, here's what I did. I made a new privilege set with everything enabled (ie a close analogue to the Full Access set). A user with those permissions gets the error about the date, just as admin does. I then made one change to deprive that user of the ability to edit, create or delete records in the table in which the date field resides. The problem goes away.

                       I also did some testing with layouts. I made a layout that mimics what's in the portal. I can edit the record there both manually and by using the scripts on buttons as in the portal. But if I switch back to the portal I get the error again.

                       So the fault appears to be confined to a portal in IWP (remember, everything works fine in FM Pro), and affects only users with permission to modify records in a related table but not those without.  It's a mystery to me why the portal makes all the difference.

                       In practical terms I can live with this as it only inconveniences administrators not users and then only when admin is using the browser not FM (ie hardly ever). But it's annoying nevertheless, and may represent a bug that FileMaker needs to look at.

                        

                  • 6. Re: Strange date error in IWP
                    philmodjunk

                         This might be worth reporting to Report an Issue as a possible bug in FileMaker. The techs may spot something we can't. You can save some typing by posting a link to this thread in your issue report.

                    • 7. Re: Strange date error in IWP
                      johnswhitehead_1

                           Many thanks for your help -- you do sterling work here. I will file a report as you suggest.