2 Replies Latest reply on Jun 20, 2012 5:19 PM by PlatinumDigital

    Changing 'Browse Mode' capability of a field within a script

    PlatinumDigital

      Title

      Changing 'Browse Mode' capability of a field within a script

      Post

      Hello. Does anyone have an idea about a conditional format of a field that I'd like to perform where the 'Browse Mode' checkbox can be unchecked within a script, and thus making the field inaccessable during data input. My database example is explained below.

      I have 'Products and Services' which fall into a selectable [Category Field] of either 'Product' or 'Service'.

      When 'Product' is selected I wish for certain fields to become inaccessable by the user and vice-versa for 'Services'.

      I'd prefer not to use tabs as I am attempting this to get it away from a tab setup that I currently have. I'm trying to minimise the number of fields I have in my table and reduce the over-all complexity. Please make suggestions if you have any.

      Regards,

      PD. (Im using FileMaker 11.0v4 on Mac OSX).

        • 1. Re: Changing 'Browse Mode' capability of a field within a script
          philmodjunk

          You might use OnObjectEnter script triggers to control access to the fields. The trigger's script can use go to field, go to object or go to next field to kick the user out of a field to which they are not permitted access. Back up the triggers with validation rules that prohibit modification when the category selected does not permit it.

          As an example, this validation calculation:

          category = "Product"

          will prohibit modification of the field is category = "Service" (or any other value except "Product")

          It's probably overkill, but you could also split your table into three tables linked in a one to one relationship. Fields in Table 1 can always be edited. Fields in Table 2 can only be edited for products, those in table 3 can only be dited for services. Settings in Manage | Security whould use a lock expression based on the category field to control access to records in tables 2 and 3 on a record by record basis.

          • 2. Re: Changing 'Browse Mode' capability of a field within a script
            PlatinumDigital

            Many thanks for these ideas. They seem very logical and should indeed solve my problem. I hadn't even considered them before. Perhaps I just need to think a little more laterally in the future. I'll give these a try and let you know how I get on.

            Regards,

            PD.