1 2 Previous Next 20 Replies Latest reply on Oct 5, 2015 5:49 PM by keywords

    Help - Database acting buggy, recover finds no errors

    luiza.b.almeida

      Hi Everyone,

       

      I'm very new to filemaker and I'm a bit worried about the database I've been working on for a while, building every little detail and, now that I'm on the final run, it's acting up with some silly bugs. I've tried to make recover the file, and it always brings me a new file with "no errors found," but soon enough, it starts acting up again.

       

      Some of the bugs are:

       

      I created modal windows so the user will only edit the information through them to either save or cancel changes. But the modal window doesn't take me to the related file, it opens a random file, strangely. On the script, I have "go to related record",  yet it doesn't. Some other random bugs show up here and there, depending.

       

      Do I have to throw my work out and start fresh? Is there anyway I can save this and stop the buggy madness?

       

      Any thoughts are greatly appreciated.

      Thank you!

        • 1. Re: Help - Database acting buggy, recover finds no errors
          gdurniak

          What Filemaker version ?  Which OS ?

           

          Odd behavior is often not a "bad" file

           

          You have a multiple file solution ?  if so,  check your External References

           

          Try creating a new relation,  and then a new script step,  perhaps in a new script

           

          If you can make it happen,  then you can fix it

           

          greg

           

          > the modal window doesn't take me to the related file, it opens a random file, strangely. On the script, I have "go to related record",  yet it doesn't. Some other random bugs show up here and there, depending.

           

          Do I have to throw my work out and start fresh? Is there anyway I can save this and stop the buggy madness?

          • 2. Re: Help - Database acting buggy, recover finds no errors
            gdurniak

            You can "Move" your Post,  to the main "Discussion" List

             

            To get more responses

             

            See here:  https://community.filemaker.com/message/511934#511934

             

            greg

            • 3. Re: Help - Database acting buggy, recover finds no errors
              DanielShanahan

              luiza.b.almeida wrote:

               

               

              Do I have to throw my work out and start fresh? Is there anyway I can save this and stop the buggy madness?

               

              Don't throw your work out.  Every solution has bugs.  Stopping the "buggy madness" involves testing, testing, and more testing.  But don't throw out your work.

               

              Regarding Go To Related Record, make sure you have a related record to go to.  You can do this a number of ways.  One way is to check if the relationship has a primary key.  For example:

               

              Set Variable [$childExists; Value: IsValid ( CHILDTABLE::ID ) ]

               

              If [$childExists  = 1]

              Go to Related Record

              End If

              • 4. Re: Help - Database acting buggy, recover finds no errors
                alquimby

                I would change:

                 

                Set Variable [$childExists; Value: IsValid ( CHILDTABLE::ID ) ]

                 

                If [$childExists  = 1]

                Go to Related Record

                End If


                to:


                Set Variable [$childExists; Value: not IsEmpty ( CHILDTABLE::ID ) ]

                 

                If [$childExists  = 1]

                Go to Related Record

                End If


                IsEmpty is a better choice than IsValid.

                • 5. Re: Help - Database acting buggy, recover finds no errors
                  DanielShanahan

                  Yes, there are a number of ways to do this, including IsEmpty ().  However, I'm curious why you believe it to be better?

                  • 6. Re: Help - Database acting buggy, recover finds no errors
                    maestrodevelopment

                    It looks like your 'go to related record' branching is not working properly.  They can be a challenge to settle down.  Very often it is an indexing issue.  I would doubt you have a corrupt database.

                    • 7. Re: Help - Database acting buggy, recover finds no errors
                      alquimby

                      IsValid is used to determine if field data is valid or invalid. IsEmpty tells you whether or not there is a related record.

                       

                      Also, I have seen developers on this forum who are much smarter and more experienced than I, say that IsEmpty is better than IsValid in determining if a related record exists.

                      • 8. Re: Help - Database acting buggy, recover finds no errors
                        luiza.b.almeida

                        Hi Allen and Daniel,

                         

                        I tried using both "IsValid" and "not IsEmpty" and it still doesn't take me to the related record. And I'm testing on records that I know for a fact have a relate-able record to go to.

                        On the layout, there are buttons to visit different layouts (related to different tables) and they all go to a related record. I have the following script set for the buttons:

                        If [IsValid ( Payment Table::Payment ID )]

                           Go to Related Record [From table: "Payment Table"; Using layout: "Payment Flow" (Payment Table)]

                        End If

                        Go to Layout ["Payment Flow"(Payment Table)]

                         

                        This works great when I navigate between layouts. However, even if I try to add this script to the modal window script, it doesn't work.

                        • 9. Re: Help - Database acting buggy, recover finds no errors
                          luiza.b.almeida

                          Hi Greg,

                          Thank you so much.

                          I don't have a multiple file solution.

                          Do you have any insight on how I could fix this?

                          Thank you!

                          • 10. Re: Help - Database acting buggy, recover finds no errors
                            luiza.b.almeida

                            Hi Maestro,

                             

                            Thank you for your input. Here is the strange thing: the GTRR branch works when I navigate from one layout to the other. For example:

                            On the layout, there are buttons to visit different layouts (related to different tables) and they all go to a related record. I have the following script set for the buttons:

                            If [IsValid ( Payment Table::Payment ID )]

                               Go to Related Record [From table: "Payment Table"; Using layout: "Payment Flow" (Payment Table)]

                            End If

                            Go to Layout ["Payment Flow"(Payment Table)]

                             

                            This works great when I navigate between layouts. However, even if I try to add this script to the modal window script, it doesn't work. Since that portion works, it seems that the records and correctly related to each other. For some reason, it is the modal window part that doesn't want to work.

                             

                            The strange thing is that there has been times in which it would work and GTRR, but now it stopped. How can I fix this?

                            Thank you!

                            • 11. Re: Help - Database acting buggy, recover finds no errors
                              DanielShanahan

                              luiza.b.almeida wrote:

                               

                              This works great when I navigate between layouts. However, even if I try to add this script to the modal window script, it doesn't work. Since that portion works, it seems that the records and correctly related to each other. For some reason, it is the modal window part that doesn't want to work.

                               

                              Luiza, when you add the go to related record in the modal window script, does the script have the same context as when you navigate between buttons?  In other words, when you execute this in your script, is the user on the same layout as when using the navigation?

                               

                              Also, it may be helpful to see a copy of the script.  Can you make a PDF and post it?

                              • 12. Re: Help - Database acting buggy, recover finds no errors
                                keywords

                                0I don't believe you need the final Go to Layout step in the script above, because the GTRR step will have taken you to that layout. It's possible this step would cause an issue when GTRR has opened a new window, so I suggest dropping it and see if that makes a difference.

                                The next thing I'd look at is the fields in the modal window, to make sure they are all from the correct TO, editable, etc.

                                • 14. Re: Help - Database acting buggy, recover finds no errors
                                  luiza.b.almeida

                                  Hi Daniel,

                                   

                                  When I add GTRR in the modal window, it takes the user to a different unsorted layout I created with the purpose of allowing the user to make changes and either save them or revert them in the end. So, I think the answer is no, the script doesn't have the same context as when I navigate between buttons.

                                  Here are a few screenshots of the situation:

                                  The basic layout:

                                  Screen Shot 2015-10-05 at 1.25.23 PM.png

                                  The fields are not editable (the browse button is unchecked) to avoid users from accidentally changing data. If they want to make changes, they need to click on "edit payment" button. This takes them to the modal window and it looks like this:

                                  Screen Shot 2015-10-05 at 1.26.36 PM.png

                                  In the modal window, they can edit the info and either save or cancel the changes.

                                  The script under the "edit payment" button is:

                                  Screen Shot 2015-10-05 at 1.27.01 PM.png

                                  OBS: I changed the step back to "Go to layout" for this screenshot because it is what opens the modal window with less errors. But the idea is for the modal window to open the same record that the user is looking at so they can make changes to it.

                                  thank you!

                                  1 2 Previous Next