8 Replies Latest reply on Jun 15, 2017 5:29 AM by philmodjunk

    How to denied typing into a type field??

    thekops

      Hi, I have just started using FM a few days ago. I was wondering is it possible to block the user from entering into a type field. However, this type field is used in a table and a list. The user can only type into the type field in the table layout but not in the list layout. Can this be done??
      Thanks in advance!!

        • 1. Re: How to denied typing into a type field??
          philmodjunk
          1. Enter layout mode
          2. Select the field
          3. On the Inspector's data tab, clear the "Browse" check box in the "Behavior" section.

           

          The user will now not be able to enter this field on this layout. This will not affect what can be done with this field on other layouts.

          2 of 2 people found this helpful
          • 2. Re: How to denied typing into a type field??
            coherentkris

            You could also control this via security/permission sets but that a bit far down the road for someone new to FM.

            • 3. Re: How to denied typing into a type field??
              philmodjunk

              I considered suggesting Manage | Security, but because of this statement:

               

              The user can only type into the type field in the table layout but not in the list layout.

               

              A layout based setting made more sense--especially since security level restrictions do not block entry into the field, the allow entry and allow the user to try to modify the data, and only then block the change and pop up an error message.

              • 5. Re: How to denied typing into a type field??
                thekops

                Is there a simple tutorial on Manage | Security or is there an easier way around it?? I am thinking of learning it too:)

                • 6. Re: How to denied typing into a type field??
                  philmodjunk

                  Well, just do one key thing when starting out: Try this on a copy of your file. Keep a copy with no changes to security around. You can toss the copy you are trying to set up security on and start over if you accidentally lock yourself out of the file.

                   

                  That may seem unlikely, but posts to the effect of "I can't get my credentials to open the file" do pop up here in the forum from time to time.

                  • 7. Re: How to denied typing into a type field??
                    thekops

                    Hi, is it possible to prevent the user from editing the field after they have submitted their inputs and clicking a button?

                    • 8. Re: How to denied typing into a type field??
                      philmodjunk

                      yes.

                       

                      Manage security is often used for this, but it can be done on the layout via layout design methods as well. Layout methods are less secure--better for "let's avoid accidents" than Manage | Security--better for let's keep users from deliberately doing what they shouldn't.

                       

                      Both would start by setting a field via the script performed by your button.

                       

                      A layout level method is to stack two copies of the field on top of each other, one with browse mode access blocked and one that permits Browse Mode access. Use Hide Object When with an expression that checks the value of the field to control which field is visible. If all the fields on the layout need this type of control, consider using two layouts and a script that controls which layout is selected.

                       

                      At the Manage | Security Level, you edit the user's privilege set by selecting "custom" for the records drop down, selecting the table for the records where you want to set this limitation, then select limited from the edit drop down before entering an expression such as:

                       

                      Lock <> 1 //assumes that your script sets the field "lock" to 1 to lock the record

                       

                      But this limits edit privileges for the entire record, not just certain fields of the record and the user is allowed to enter and attempt changing the data before getting an error denying their attempt.

                       

                      You can also set a field validation in Manage | Database | Fields:

                      Same expression:

                       

                      Lock <> 1

                       

                      This controls access to a single field and also allows users to attempt the change before throwing up an error message.