5 Replies Latest reply on Dec 15, 2011 2:43 PM by vmtc

    Drop down list with script trigger

    vmtc

      Title

      Drop down list with script trigger

      Post

      Hi,

      I've set up a menu with drop down lists that trigger a script OnObjectModify. They do basic things like Find, Update and Add records to one or other of the tables that make up the database (authors, books, sales info etc). I thought it was all working fine. But it's been reported back that if someone is working in a file, and another user tries to select something from the drop down menu, they get an error message telling them that the other user is modifying the file. I'm not talking about a record, but an entire file. The person can get into the file another way, but I don't understand why it doesn't work from the drop down trigger. 

      It's FM 11.

      Can anyone help?

      Thanks

        • 1. Re: Drop down list with script trigger
          Sorbsbuster

          'They' do basic things, so is the drop-down triggering a range of scripts?  Do all the scripts produce the effect?  Can you post the content of any one that does produce the fault?

          Can you post a screen shot of the error message?

          What is the 'other way' that you refer to here: "The person can get into the file another way"

          • 2. Re: Drop down list with script trigger
            philmodjunk

            There are right/safe and wrong/dangerous ways to access a shared file. How are they accessing the file?

            Open Remote is the correct and safe way to open a shared database. If they access a shared directory and open it directly with File | Open or by double clicking it, they risk corrupting the file as well as producing this error message.

            • 3. Re: Drop down list with script trigger
              vmtc

              Hi Sorbsbuster,

              Yes the scripts all work fine, providing the user can select the value (that's the issue I'm trying to solve).

              If User B is using the table when User A clicks into the drop down list to select the value (that is a parameter for the script), they get the error message below. However a button linked to the same script works, even when you can't select from the drop down menu. That's what I mean by 'another way'. The point of the drop down menus is to reduce the screen clutter.

              Hi Phil,

              They are accessing the file via Open Remote, using Filemaker Server v.8. They open a centralised menu that opens several other interlinked files and tables (based on the BPK template).

              Also, playing around with this, I've discovered that it doesn't always happen, but infuriatingly, I can't figure out why. At first I thought it was whether the relevant table was hidden or not, but it isn't that. It seems to not happen when you want to replicate it; and happen when you want it to work!

              All ideas gratefully received.

              • 4. Re: Drop down list with script trigger
                Sorbsbuster

                Hmm.. You specifically said that the "they get an error message telling them that the other user is modifying the file. I'm not talking about a record, but an entire file."  That was the bit that fooled me - this record is locked, not the file.  That is common - and good - database practise.  The randomness of it arising is because it only happens when two users happen to be trying to do it from the same record.

                If you only want the pop-up to be a script-trigger parameter then you should be able to achieve the same thing by changing the field to be a global value.

                • 5. Re: Drop down list with script trigger
                  vmtc

                  Yes, sorry. It was initially reported to me and I was working remotely and didn't replicate it until I got to the office. I also used 'file' when I meant 'table'.

                  Also, the penny's just dropped that I was looking for the problem in the wrong place. The menu file, where they select the drop down, only has one record, and obviously that's where the conflict is. I will make the field global and hopefully that will sort it. 

                  Thanks for your help.