14 Replies Latest reply on Aug 8, 2016 3:56 PM by atarvin

    Validation does not return to the tab it started on.

    atarvin

      This should be an easy problem to solve, but I'm having trouble.

      I've got a file where everything revolves around the staff member selecting their name from the pop-up menu as soon as the file opens. The home page has a layout with several tabs, and the name field appears somewhere on each of the tabs. They only need to select their name once on Tab 1 for it to populate everywhere on the other tabs.

       

      I can't seem to get staff trained to select their name. They jump right past it to the next editable field. So I've tried several ways of putting validation on the name field and the problem is that if the validation fails, instead of going back to the tab and the field where they started, it always jumps to the name field occurrence on next layout tab and they are somewhere they had no intention of being. It's not quite like taking them unexpectedly to a new page layout, but pretty close to the same effect.

       

      I tried selecting the field and choosing validation > Not Empty. It jumps to next tab.

      I tried a few scripts using OnObjectExit. It jumps to next tab.

      I've named the field as an object, but I'm missing something when I try creating "If" scripts. Should I be using a formula Case instead? Could someone give me a step by step calculation please, and tell me exactly where to place it?

       

      Thanks

        • 1. Re: Validation does not return to the tab it started on.
          SteveMartino

          It's hard to figure out what is going on when the file opens or how the different users interact with it.  It seems like a design issue that it's too easy to not have the user put their name in first.

          Do they log in or can anyone open the file with one u/n and p/w?

          If so, that may be the first problem to solve, giving each one a user account.

          Or

          Is the file open and multiple people use the same terminal but have to click on their name when it's 'their turn'?  If so that's also not the best design.

          Why not on opening the database, take the user to a screen that only allows them to select their name first-pop over or modal window before they are allowed to proceed.  Better would be everyone has their own user account with u/n and p/w

          1 of 1 people found this helpful
          • 2. Re: Validation does not return to the tab it started on.
            carlosilvia0

            Hi,

            I suggest to create a layout with only a field where the user insert name from the pop-up menu. Add two button, first "Confirm" with a script1 and second "Exit" with script2.

            The script1 verify that field with name is not empty. If empty it appear a alert message. If the value inthe filed is correct go to layout with tabs.

            The script2 exit to database.

            1 of 1 people found this helpful
            • 3. Re: Validation does not return to the tab it started on.
              greatgrey

              Are you using the same field where it jumps to? It may be looking at it as the same even though it is formatted differently.

              You can try this but, if the above is the problem it may not work either.

              A script trigger on Field_name

              A script that checks Field_name for if empty then goto Field_name if it is empty.

              • 4. Re: Validation does not return to the tab it started on.
                Johan Hedman

                When I work with several tabs and want different users to end up on different tabs I got two techniques to handle that

                 

                1. Put a Label somewhere on that tab and give it a Name . In your script you go the the Name (label) depending on who the user is

                 

                2. With Hide object when you can have a square object above everything in a tab, like hiding stuff. If you do not want a user to see/enter information you only create a square object on each tab and with Hide Object first take them to the right tab with point 1 and then hide all other tabs information (fields/labels etc) with another square object

                • 5. Re: Validation does not return to the tab it started on.
                  Markus Schneider

                  What version of FileMaker are You running? Is the file hosted on FileMaker server?

                   

                  As others mentioned, it's hard to say..

                   

                  But a few thoughts:

                  - Do You have an user table where the specific data is stored (validation?)?

                  - You could set a $$Variable with some user specific parameters

                  - You could bring a separate layout in front when a user logs in, validate there and go to the home-layout. You can 'lock' an user there until they select/type in account-data (no tabs in that layout)

                  - according to the $$Variable, You can select the tab (You can also use slide-elements instead of tabs, might be easier in some way

                  • 6. Re: Validation does not return to the tab it started on.
                    PeterDoern

                    In the script that is called by your script trigger, try adding an Exit [Text Result: "false"] step if it fails validation. It should prevent the user from exiting the tab.

                    • 7. Re: Validation does not return to the tab it started on.
                      keywords

                      In my experience, users of databases we design are a bloody-minded bunch, very difficult to train to do exactly what you want them to do—if there is a way to get around following exactly the steps you intend they will find it and trip you up. While this may seem like a negative thing, it is in fact positive as it forces us to design things better. In your particular case, if this were me and everything in my design hinged on a user selecting their name first I would be looking for a design that ensures that nothing else is possible until that is done. Alternatively, I would try to design in such a way that the precise order of things was not quite so critical. It seems to me from your description that you are trying to force the critical first step, but have users doing that on a layout on which there are ways for them to circumvent your intention. The solution may be to have the file open on a layout on which NOTHING was possible other than your critical first step.

                      1 of 1 people found this helpful
                      • 8. Re: Validation does not return to the tab it started on.
                        atarvin

                        I probably should have built separate accounts for everyone, but there are only 12 of us and we are hardly ever all on at the same time. I thought it would be easier to create detailed reports using a single value list for staff names. Over time, I've come to realize the staff expectation is that they have their own account, but at this point I don't have the considerable time it would take to rebuild.

                        • 9. Re: Validation does not return to the tab it started on.
                          atarvin

                          I had tried what you suggested, but it jumped to the next tab. That's why I was trying to get it to jump back to the specific named object on the first page, but couldn't get that to work because my code kept throwing errors.

                          • 10. Re: Validation does not return to the tab it started on.
                            atarvin

                            I'll remember that bit about hiding objects for another part of the file.

                            • 11. Re: Validation does not return to the tab it started on.
                              atarvin

                              This seems like it should work, but once again, I don't know enough about coding syntax to get it to work. It kept asking me for another specific field name somewhere in there.

                              • 12. Re: Validation does not return to the tab it started on.
                                atarvin

                                We are set up as a workgroup. No Filemaker server, just a shared file for the 12 of us, sitting on it's own computer that always stays on.

                                • 13. Re: Validation does not return to the tab it started on.
                                  PeterDoern

                                  you should be able to just type "false"... no need to select a field or anything. Although, based on your comment that you're sharing the file with 12 users over file sharing, I think you've got bigger problems.

                                  • 14. Re: Validation does not return to the tab it started on.
                                    atarvin

                                    You said "If there is a way to get around following exactly the steps you intend they will find it and trip you up." It got me thinking about how they could possibly skip the first step so often.

                                     

                                    I did some snooping, and it turns out they are opening the first page, skipping the whole thing and almost all of them head directly to various layouts where they do some quick entries, then exit. Then they come back later and fill in the missing details. Bingo.

                                     

                                    I'll be experimenting with creating a first page that contains only a name choice field, and I'll try some of those validation ideas.

                                     

                                    But for the interim I am trying a low tech-fix --adding the name field to the alternate layouts and have it be the first place the curser goes there as well.  They can then use the file however they want- in a hurry, or using it the "proper" way to fill in details when it's time to generate reports. All this is a symptom of some poor design I'm sure, but they like how the rest of it works, so I'll keep plugging along.

                                    Thanks, all, for the input.