12 Replies Latest reply on Oct 14, 2013 11:16 AM by philmodjunk

    Dwindling/Diminishing Value List Not Working on Filemaker Go

    AndyPullen

      Title

      Dwindling/Diminishing Value List Not Working on Filemaker Go

      Post

           I have a functioning diminishing value list on Filemaker for a class attendance database. Huge upgrade from checkboxes! Anyway, when I open the hosted database on my iPad, I get no options in the value list. I put a field in to see what was there, and sure enough <no values defined>. Anyone have any ideas?

        • 1. Re: Dwindling/Diminishing Value List Not Working on Filemaker Go
          philmodjunk

               Don't see why that would be. Perhaps the issue is not due to being opened in GO but some other reason.

               Since there is more than one way to implement such a list, please describe exactly how you set up this value list.

          • 2. Re: Dwindling/Diminishing Value List Not Working on Filemaker Go
            AndyPullen

                 Thanks for your help! I'm not sure why that would be, either. I attached the relationships in the image. Effectively, I've got a many-to-many relationship between Individuals and Events, joined by "Attendance". For some reason, the Diminishing value list just doesn't get populated on Filemaker Go, but it does fine on Filemaker Pro. So I'm with you in thinking that I've set something up that's wonky.

                 The order of my tweaking was this: I set up an event list with a portal that shows all students with a button by each with a script to check them in & out. Worked great until I started using it. The script I used required the window to refresh, which reset the scroll point in the portal window, and we're working with a long list of kids. So I morphed that solution to the one I have now which checks kids in when you select them from a diminishing value list called up by a pop-up window. Hope that gives you enough to go on? Let me know if I'm missing something. And thanks again!

            • 3. Re: Dwindling/Diminishing Value List Not Working on Filemaker Go
              AndyPullen

                   Also, I don't know if it's pertinent, but here's the Value List window.

              • 4. Re: Dwindling/Diminishing Value List Not Working on Filemaker Go
                philmodjunk

                     What is EventContactList? Is it a calculation field? What Calculation is used to generate what ( I assume) is a return separated list of ID's?

                     When I first experimented with using such a diminishing value list, I discovered that I could get this very problem when I started out with no values yet selected and thus none yet omitted from the conditional value list. I then figured out a calculation that resolved that issue so I am wondering if on the iPad you were starting out with a brand new event where you were testing it on your computer with an existing event that already had some individuals selected.

                     In any case, once I have a complete picture, I can use my iPhone to try and reproduce the issue.

                • 5. Re: Dwindling/Diminishing Value List Not Working on Filemaker Go
                  AndyPullen

                       EventContactList: Unstored, = If ( IsEmpty ( Attendance::StudentID ) ; 0 ; List ( Attendance::StudentID ) )

                       'Do not evaluate...' is unchecked.

                       Unfortunately (for troubleshooting purposes) the list doesn't populate on new or already populated events on the iPad. It does on both, however, on Pro. Would it help if I sent you a record-less copy of my file? Thanks again for your help!

                  • 6. Re: Dwindling/Diminishing Value List Not Working on Filemaker Go
                    philmodjunk

                         I don't think that I'll need it. I have a demo file here that uses the same method and I can open a copy on my iPhone and test it to see if I get the same issue or not.

                    • 7. Re: Dwindling/Diminishing Value List Not Working on Filemaker Go
                      philmodjunk

                           What you have looks like an exact copy of what I use in my Demo File, even to the 0 used to keep the list from being empty. When I use Drop Box to pull a copy of the demo file onto my iPhone and open it, the diminishing value list in it works exactly as designed.

                           Here's a link to that file: Put it on your iPad and see if it works for you or not. (I am assuming that you are using FileMaker Go 12)

                      https://www.dropbox.com/s/1e1plcj0pb1eiyb/ManyToManywDemoWExtras.fmp12

                      • 8. Re: Dwindling/Diminishing Value List Not Working on Filemaker Go
                        AndyPullen

                             Yes, I do have Filemaker Go 12, and Pro Advanced 12. I did put together what I have trying to unpack your demo file and the file at http://www.filemakerhacks.com/?p=5219 that does the same thing. So it's probably a reverse-engineered Frankenstein version of the two files. Yours does work when opened on Go.

                        • 9. Re: Dwindling/Diminishing Value List Not Working on Filemaker Go
                          AndyPullen

                               Figured it out. It had to do with the gRefreshTrigger X Refresh. Removing that relationship did the trick. Thanks again for your help, PhilModJunk.

                               I do have another question related to your demo file. In your checkboxes method, is there any way to do the calculation without resetting the scroll position on the portal? Thanks.

                          • 10. Re: Dwindling/Diminishing Value List Not Working on Filemaker Go
                            philmodjunk

                                 Can you be more specific as to what calculation you are referring to?

                            • 11. Re: Dwindling/Diminishing Value List Not Working on Filemaker Go
                              AndyPullen

                                   Sure. I think it's actually the script tied to the "button" you made out of the checkbox and the name field, "Add/Remove selected contact." Since the script goes to the layout for the join table, adds a record, then comes back, the scroll position of the portal resets to the top. You can test this on your file by adding enough Contacts to make it need to scroll, then check somebody off at the bottom. I'm wondering if there's a way to work around this and make the scroll position stick. Thanks!

                              • 12. Re: Dwindling/Diminishing Value List Not Working on Filemaker Go
                                philmodjunk

                                     One method is to use Get ( ActivePortalRowNumber )

                                     to capture the portal row number of the row that was clicked at the beginning of the script.

                                     Then add Go to Portal Row at the end and specify the variable.

                                     That will keep the portal row visible, and give back the focus to it, but it may "jump" in some cases to the top or bottom of the visible rows in the portal.

                                     You'll also need to assign an object name to this portal and precede the go to portal row step with Go to Object if there is more than one portal on your layout.

                                     Another way to minimize this issue is if you can use a category field to only display a small number of records at time in the "check boxes" portal.

                                     A third option is to add another table occurrence of the Join table and link it to the Layout's table occurrence using global fields for the two ID fields both defined in the Layout's table as match fields to the fk fields in the join table. With "allow creation" enabled, this relationship can be used with set field to add a new record in the join table if it does not exist. But it can't be used to delete a record.

                                     But you could include a extra match field such that your layout's record only matches to records in the join table only if a number field in the join table is 1. The original relationship would need to be changed to look like:

                                     LayoutTable::Pk = Join::Fk AND
                                     ConstOne = Join::IncludeFlag

                                     ConstOne is defined as a calculation field with the number 1 as it's sole term in the calculation dialog.

                                     The relationship used with the script would look like:

                                     LayoutTable::Global1 = Join|Checkboxes::LayoutFK AND
                                     LayoutTable::Global2 = Join|CHeckboxes::PortalFK

                                     Then:

                                     SetField [ Layout::global1 ; Layout::pk]
                                     Set FIeld [Layout::global2 ; Portal::pk ]
                                     Set Field [ Join|Checkboxes::IncludeFlag ; 1 ]

                                     Will create the record

                                     and:

                                     SetField [ Layout::global1 ; Layout::pk]
                                     Set FIeld [Layout::global2 ; Portal::pk ]
                                     Set Field [Join|Checkboxes::IncludeFlag ; 0 ]

                                     will exclude and existing join table record.

                                     You can run a script when the file closes or when you exit this layout that finds and deletes all Join records with 0 in this field to remove them at a time when doing so won't affect your portal scroll.