5 Replies Latest reply on Apr 21, 2009 5:22 PM by synergy46

    How do I script 'clicking outside a portal'??



      How do I script 'clicking outside a portal'??


      I have a portal that has a dropdown field (NUM--text) that shows all the values in NUM.  When the user enters a 'new' NUM and tabs to the 'description' field everything seems OK.  But, if I go to the next row and click the dropdown NUM, the previous value DOES NOT show unless I click outside the portal and then come back into it. 


      I have tried: Window Refresh and Record Commit and they don't do it.   Got any ideas?



        • 1. Re: How do I script 'clicking outside a portal'??

          Hi synergy46,


          If you are using FileMaker Pro 10 have you tried setting up a script trigger that runs a script on exit of your field with the dropdown that simply has a Commit Record/Request [ Skip data entry ; No dialog] set to it?


          This might do the trick. 

          • 2. Re: How do I script 'clicking outside a portal'??

            Yes, I am running FM 10 adv and have created a script that:  goes to a layout.... does a 'find'... copies the 'description' field to a variable... goes to the last row... inserts the variable into the empty 'description' row... and returns to the original layout.    In this script I have inserted Commit Record but it doesn't seem to work.



            • 3. Re: How do I script 'clicking outside a portal'??

              Sounds like it should do the job, just the act of going to a different layout commits the record.


              At what stage is this script run?



              • 4. Re: How do I script 'clicking outside a portal'??

                Thanks for the reply.


                Just to simplify things, I unhooked the script triggers and the problem persists.  (there are no scripts running)



                You can see HERE the relationships among the tables and that I have a value list that references the NUM field that also shows the value list.  It works but I have to click outside the portal, usually to a different layout, to get the NUM value list to 'update'.   I have written little scripts that perforemed "window refresh" and "record commit" and attached them to the NUM field 'on exit' but that too did not help.   Is this a 'bug' in FM??? 


                Update:  It seems that everything works as 'expected'; ie, the NUM dropdown populates with new field values IF I migrate to the next record and then come back to the current record.....????  And 'commit' doesn't work???!?!?!??!

                • 5. Re: How do I script 'clicking outside a portal'??

                  GOT IT !!!


                  I had 2 fields:  NUM and Description on the portal.  I had a script trigger (ON EXIT) attached to NUM that when exited did a Record Commit.  This DID NOT Commit the record.  


                  What worked was to attach the same "Commit" script (one line of Record Commit) to the Description field on Exit.  


                  It seems that FM updates the record after ALL the fields on the portal are filled in.   This begs the question "What if I wanted a field to be blank?"


                  Oh well.. seems more like a bug in FM.