5 Replies Latest reply on Oct 9, 2013 1:21 PM by philmodjunk

    Get (ActiveFieldTableName) Drag and Drop

    Jean-Francois

      Summary

      Get (ActiveFieldTableName) Drag and Drop

      Product

      FileMaker Pro

      Version

      12.0Av4

      Operating system version

      Win7

      Description of the issue

      Picture that are drag and drop from the desktop into a portal that have a field container will not return the table name on creation

      Steps to reproduce the problem

      Portal with a container field and a 2nd field that is use to auto-enter value using calculation

      Case(
      Get ( ActiveFieldTableName )="Projet_Photo_0";0;
      Get ( ActiveFieldTableName )="Projet_Photo_1";1;
      Get ( ActiveFieldTableName )="Projet_Photo_2";2;
      33)

      Expected result

      return the current table name

      Actual result

      NO table name is return when drag drop
      correct table name is return when using the right-click import picture

        • 1. Re: Get (ActiveFieldTableName) Drag and Drop
          Fred(CH)

               Hi Jean-François,

               Not sure to understand :

               Since a drag and drop doesn't change the active field (the focus in other words), i think it is not possible to use the Get (ActiveFieldTableName), even with an OnObjectModify trigger, if the goal is to get the name of the table where the file was dropped.

               You will get the same result even without a portal, if the active field is not from the same table than the "dropping field". 

               Am i wrong ?

               Bye, Fred

          Edit : But you can use the Go to Field step on a OnObjectModify triggered script to do it ;-)

          • 2. Re: Get (ActiveFieldTableName) Drag and Drop
            philmodjunk

                 Or you can pass the name of the field (or an object name) as a parameter in the OnObjectModify Script trigger to pass the name to the script.

            • 3. Re: Get (ActiveFieldTableName) Drag and Drop
              Fred(CH)

                   Yep : Phil's idea sounds better than mine... blush

                   Mmmh i am now thinking about another more generic :
                   Naming the layout's object and use the Go to object instead of Go to Field on the triggered script ...
                   Thus, you can easily transpose this technique on different tables and layouts.

                   (Even we are posting in the wrong section for the tips and trickswink)

                   Bye, Fred

              • 4. Re: Get (ActiveFieldTableName) Drag and Drop
                Jean-Francois

                     Thanks but it's not a trigget script, it's on the field auto-enter value, based on calculation.

                      

                     I have a tab panel with 3 tab, each have a portal displaying pictures, all of them ore on the same database, but use 3 different table name and I use that 2nd field to filter them on each separate tab, so I can see a picture of the front house on tab1, picture of the job before (tab2) and after(tab3)

                      

                     So when I importe the picture using the manual right click, that 2nd field will receive the proper number for the filter and each portal will display the picture that was add based on the current tab (and job view) and it's working great, unless you use drag and drop !!

                      

                     Sorry for my english explaination, my french is better !!

                      

                • 5. Re: Get (ActiveFieldTableName) Drag and Drop
                  philmodjunk
                       

                            Thanks but it's not a trigget script, it's on the field auto-enter value, based on calculation.

                       Which won't work as Fred has already explained. A script trigger, on the other hand CAN do what you want here.

                       You can set up OnObjectModify to perform a script and can use an expression such as GetFIeldName ( YourTable::YourFIeld ) to pass both the table occurrence and field name of the field being modified to the script for the script to use to modify data in a field in order to place that "proper number for the filter".