1 2 Previous Next 22 Replies Latest reply on May 20, 2016 10:53 AM by TSGal

    Unable to retrieve a repetition based on number in window name

    Extensitech

      Summary

      Unable to retrieve a repetition based on number in window name

      Product

      FileMaker Pro

      Version

      14

      Operating system version

      Windows 7, Mac

      Description of the issue

      In past versions, we use a number in the window name to fetch a repetition from a global. We use this, for instance, to update and retrieve help text that can follow a user through a process in one window, while not affecting the help text following another process in another window.

      It appears that there's some sort of behavior change between 13 and 14.

      In version 13 (and prior) we can define a global with repetitions, and then define a calculation that is equal to a particular repetition of that global, using a number in the window name to determine which repetition to use.

      In version 14, we can get the number from the appropriate window name, but cannot use it as the repetition parameter in the calculation. No error message is given, but the calculation retrieves either no value or the wrong repetition, unless we go into layout mode and then back into browse (impractical).

      As a larger principle, we use this to associate things with a particular window instance, as opposed to the layout or table, since the user could be viewing the same or different layouts in various windows, and the deciding factor isn't the layout or table. Using field definitions or variables without a window number will not allow us to show a different message and/or image in different windows showing the same layout (and possibly, the same record).

      This may, admittedly, seem arcane, but the method has been very useful in our development and allowed us to have a cohesive, intuitive and helpful interface in a multi-window environment. We're desperately hoping that this is, as it appears, an oversight and not a permanent change.

      Steps to reproduce the problem

      See example files posted here: https://community.filemaker.com/message/197770#197770

      We're using separation (the results are similar, though not identical, in a single file).

      Create a data file.
      In the data file, create a globals table with a repeating "global" field.
      In the data file, create an "entries" table with a field calculated to be the globals::global [ get ( windowname ) ] (unstored)

      Create and interface file.
      In the interface file, add both data tables to the RG
      Create a layout for the global field with multiple repetitions, and add values to the first few repetitions.
      Create a layout for the "entries" table, displaying the calculated field.
      Rename the window "1"
      Open a new window, and name that window "2"

      Expected result

      Should see repetition 1 of the global in window 1, and repetition 2 of the global in window 2.

      Actual result

      When the window name changes, we get no value in the calculation, or an incorrect/inconsistent value.

      Note that if you define a calculation field for get (windowname) (unstored), you'll get the right number in each window.

      Exact text of any error message(s) that appear

      n/a

      Configuration information

      See example files posted here: https://community.filemaker.com/message/197770#197770

      Workaround

      While we can (probably?) find other ways to accomplish each individual use of this method, we're unaware of another way to associate information with a window, rather than a table or layout. We may be able to work around this in some ways, but ultimately the we'll be unable to continue offering an interface that allows the user to operate in multiple windows, but still offers a robust and cohesive experience.

        • 1. Re: Unable to retrieve a repetition based on number in window name
          philmodjunk

          I'm using FMP 14 and Windows 7. I cannot reproduce this. I used a simple script that incremented a variable and then opened a new window with the variable specified as the window name to get windows named 1, 2, 3. As shown in the screen shot, each window shows a different result in the GRepWindow calculation field. The global repeating field with values of one, two, three is shown on the left.

          • 2. Re: Unable to retrieve a repetition based on number in window name
            Extensitech

            Could you compare these to the files I posted in the forum?

            Could you send me your files?

            If you're using a variable, what happens when you refresh any of the windows?

            I know you'd prefer to do all our communications here, but if you could call or email me, we might get through this more quickly. I sincerely hope you're right, but I don't believe a variable is the solution here.

            Chris Cain

            Extensitech

            • 3. Re: Unable to retrieve a repetition based on number in window name
              philmodjunk

              I'm not suggesting that using a variable is the solution Whether I use a variable or not should not make any difference in how this works. It was just a convenient means for quickly creating the new windows with the correct number for a window name.

              Refreshing the window does not affect the results. They still correctly show a value from the repetition specified in the window name.

              Using a varient of this script that creates a new window named 2 also works.

              But I now can get this to fail if I use the Set Window Title step to change the window name to a number. I then have to refresh the window before the calculation field updates to show the correct value. Since I've never tried this before, I don't know if this is different from what would happen in FileMaker 13.

               

              • 4. Re: Unable to retrieve a repetition based on number in window name
                Extensitech

                Could you please download and review the files I posted? I cannot tell from your description how your method differs from mine, and I cannot see your files to evaluate what you are doing differently. I believe either you need to see my example files, I need to see yours, or both.

                • 5. Re: Unable to retrieve a repetition based on number in window name
                  philmodjunk

                  Frankly, the scripts I am using are very simple. Each are just a few steps and while I haven't posted them, the descriptions I've posted should be enough to recreate them.

                  Sorry but I don't have time to compare files right this moment.

                  But you are welcome to download mine and compare it to yours. The file name and timestamp fields are there because I first used this file to test an issue with time stamps.

                  The button will create a series of new windows numbered 1, 2 and 3. There are other scripts that refresh the window, create a window with an explicit number (no variable) and one that changes a window's title to a number.

                  https://dl.dropboxusercontent.com/u/78737945/TS%20Test.fmp12

                  • 6. Re: Unable to retrieve a repetition based on number in window name
                    Extensitech

                    Please review my post. We are using the separation model, so the data is in a separate file.

                    • 7. Re: Unable to retrieve a repetition based on number in window name
                      philmodjunk

                      I did read that, but really didn't expect that to make any difference other than possibly requiring a refresh after the change.

                      But since you've raised the point and stranger things have happened, I split the file into interface and data parts and repeated these tests from the interface file. My results did not change.

                      You can check the new files found in this zip folder:

                      https://dl.dropboxusercontent.com/u/78737945/TS%20Test%20interface.zip

                      • 8. Re: Unable to retrieve a repetition based on number in window name
                        philmodjunk

                        I started with newly created files in FMP 14. If you are using files created in FMP 13, that might explain our different results. That would seem unlikely, but stranger things have happened before...

                        • 9. Re: Unable to retrieve a repetition based on number in window name
                          Extensitech

                          Rebuilt my demo in FMPA14. It does work better than my original file, although the setup is the same. It still seems to break when the repeating global is a container.

                          Rebuilding multiple large solutions from scratch in FM14 is not a workable workaround, of course, and it appears to still have issues.

                           

                          • 10. Re: Unable to retrieve a repetition based on number in window name
                            philmodjunk

                            Hmmm, I'm using a global text field. You are using a global container field. Does this container field store graphics or other file types?

                            I just changed the field type to container and the unstored calculation field's result type to container and inserted colored rectangles into the repeating global field. They work too.

                            Just to leave no option untried, you might try running a recover on your file. It's not unheard of for a file to have hidden damage that does not produce any observable problems until you upgrade the application or your OS to a newer version or switch platforms altogether.

                            So there is at least a slim chance that a recovered file will not have this issue.

                            • 11. Re: Unable to retrieve a repetition based on number in window name
                              Extensitech

                              The two new files I created in 14 had never even been closed, let alone closed improperly.

                              The files I'm using are gifs and jpg's.

                              I really don't know what to tell you. I've produced demo files that illustrate the problem, and I have another set, created in 14, that I could send you if you'd like.

                              Even if this only occurs in files created in v13, it represents a bug, since rebuilding all past solutions isn't a realistic option. At the very least, it's an undocumented (unintentional?) change.

                              Chris Cain

                              • 12. Re: Unable to retrieve a repetition based on number in window name
                                philmodjunk

                                I was not referring to your files created in 14 as it was my understanding that you were having trouble with files created in older versions. Had that been the case, recovering one or two of your existing files to see if the recovered file worked might have been a way to correct the problem. I never saw this as more than a bit of a long shot though.

                                It's a strange FileMaker 14 bug when others can't reproduce the issue however . Dropping colored rectangles into the field should be a very good test for jpegs and gifs so I'm surprised that these are causing trouble for you in an FMP 14 created file. Had these been PDF's that might have identified other possible issues here. How large are these gifs? I can drop more complex graphics into my test files if you want, but again, I'd be very surprised to get different results here.

                                Are the image files embedded in the container field, use external storage or is a reference to the file stored in the container?

                                And I just tried this with three embedded jpegs--two iPhone photos and a screen shot and the test file still works perfectly except for the expected need for a window refresh when I rename an existing window instead of creating a new window with the number 1, 2, or 3 as its window title.

                                • 13. Re: Unable to retrieve a repetition based on number in window name
                                  Extensitech

                                  Please download and try with the demo files I created.

                                  I've now reproduced this in two sets of demo files and the original solution where I uncovered the issue. I've tested the original file and the first of the demo files on a Mac, and the issue persisted.

                                  This is complex, and admittedly difficult to explain. I don't know how better to provide more details than to show you the demo files.

                                  I understand that you may not have time today to review the files, but I created them to save the time we're spending going back and forth. If you'll download and open those files, I believe you'll have seen the issue reproduced, and we can go from there.

                                  • 14. Re: Unable to retrieve a repetition based on number in window name
                                    philmodjunk

                                    Or you could compare my demo file with yours and note the differences?

                                    1 2 Previous Next