3 Replies Latest reply on Feb 7, 2011 12:34 PM by philmodjunk

    get(activelayoutobjectname) and get(activerepetitionnumber) do not work!!!

    med

      Title

      get(activelayoutobjectname) and get(activerepetitionnumber) do not work!!!

      Post

      I have a layout containing repeating fields and I need to save in variables where the cursor is (which field is in focus).

      I set up the field as a button do perform a script and I also tried using the onobjectenter trigger.

      The script has a set variable to get(activelayoutobjectname) and get(activerepetitionnumber) and I gave the object a name in "position"

      But I am getting space and a zero for both functions respectively. I also tried get(activefieldname) with no luck.

      What is the catch?

        • 1. Re: get(activelayoutobjectname) and get(activerepetitionnumber) do not work!!!
          philmodjunk

          "Active" means that the cursor is physically in the field or repetition of a field. If you have formatted the field as a button, you have blocked yourself from actually putting the cursor into the field/repetition by clicking it--so that would seem the most likely explanation here.

          • 2. Re: get(activelayoutobjectname) and get(activerepetitionnumber) do not work!!!
            med

            I removed the button diffinition and I also had to allow data entry in browse mode to get it to work. It seems that I cannot set the focus on the fieldIf the layout is for desplay only meaning that I disable data entry .

            That destroy my idea of designing this layout.

            I need to display values from a table in the form of a grid, and not change the values but identify what line and column I am clicking on to perform certain complex functions on that field.

            Can you give me a hint?

            • 3. Re: get(activelayoutobjectname) and get(activerepetitionnumber) do not work!!!
              philmodjunk

              You could place a transparent, invisible button over each field repetition. Set each such button to pass a script parameter that containes the number of the column clicked.

              There are also alternatives to using repeating fields that might also eliminate this, more complicated approach. There's a "horizontal portal" trick, (multiple single row portals arranged side by side), for example that can enable you to display records from a related table in columns of data and in that case a single, non-repeating field can be used--which can give you a much more flexible structure for your data.