7 Replies Latest reply on Nov 15, 2016 1:10 AM by thehalpeen

    Starter Solution  FM 15 - Assets

    thehalpeen

      Can anyone explain the behaviour of the container fields. When I drag an item into one of the placeholders called 'Drag a Picture Here' the picture or documents appears as you would expect. But when I try to delete the item entered, it won't allow me. I get the following message - "Before typing, press tab or click in a filed, or choose the New Record menu command".

       

      I am allowed entry in 'Browse' mode via the Inspector - so I'm a bit confused. This is a nice security measure - but how is it done?

        • 1. Re: Starter Solution  FM 15 - Assets
          planteg

          Hi thehalpeen ,

           

          how do you proceed to empty the container, exact sequence of actions ? Usually you get this message when typing and no field has the focus (you have not entered in any field), or the field can't be edited.

          • 2. Re: Starter Solution  FM 15 - Assets
            thehalpeen

            Planteg,

             

            I'm trying to understand how the developer of this 'Asset' Starter Solution manged to prevent a user from deleting the item in the container field. I seem to be capable of clicking in one of the container fields - there are 5 small containers where you can drag a picture - but not deleting when i click-on one of these 5 container fileds. I'm wobdering how he has manged to prevent me from deleting?

            • 3. Re: Starter Solution  FM 15 - Assets
              planteg

              To discover how it's done, I suggest you bring the Layout in question in Layout mode and to search around what prevents you from deleting. If you wish not to break the actual solution, you may copy it to do you searching.

               

              It's qui te possible that there is another control over the container: move away what seems to be the container to discover if it's the case. That may be the way the developer used to control deletion. One other way can be a script. If you have FMP Advanced, use the debugger to lean what's going on when trying to delete.

               

              If you don't find, I will dig in for you.

              • 4. Re: Starter Solution  FM 15 - Assets
                thehalpeen

                Planteg,

                 

                I've done all that snooping around. The field appears to be grouped. There are two script triggers associated with the field, but I can never get to see one of these triggers, when when you un-group the field one of the triggers disappears - so it still remains a mystery as to what the Developer has done.

                 

                Halpeen

                • 5. Re: Starter Solution  FM 15 - Assets
                  planteg

                  I have been there, when one begins with FileMaker, it can be hard to find it's way.

                   

                  I'll have a look and and will come back to the thread.

                  • 6. Re: Starter Solution  FM 15 - Assets
                    planteg

                    Halpeen,

                     

                    mystery solved ! In the bottom where there are five containers, for each container there are three objects that are overlayed. From bottom to top:

                     

                    • a rectangle that makes the width of the five containers
                    • a container (a container and a button that are grouped)
                    • a rectangle that displays 'Drag a Picture Here' when the container is empty.

                     

                    There are Hide when conditions and some conditional formatting, but that does not matter in the effect you wish to explain.

                     

                    When one select a container by clicking on it, this action is set to the button:

                     

                    Set Field [Assets::Selected File; GetFieldName(Assets::File 1 Container)]

                     

                    This will set the contents of 'Selected File' to "Assets::File n Conatiner", where n = 1 to 5. Why do we need to store the name of the container field in 'Selected File' ? In fact we do not need that. The resulting effect is to move the focus to a different field, and that field is not on the Layout. Hence you get the message when hitting Del or Backspace because no field has the focus. Since the Container doesn't have the focus, you can't empty it .

                    1 of 1 people found this helpful
                    • 7. Re: Starter Solution  FM 15 - Assets
                      thehalpeen

                      Planteg,

                       

                      Well spotted. I had taken all those steps but had missed that point about shifting the focus - it's the little things that trip you up - but this wasn't so little because it's not every day you come across this technique.

                       

                      Well spotted and thanks for taking the trouble to investigate!