2 Replies Latest reply on Dec 21, 2014 9:39 AM by lijnbach

    Prevent access when in "New record" mode



      Prevent access when in "New record" mode


      Hello everybody,

      I don't know if it is possible, but this is the question;

      I have a lay out in "List view". Works all fine. But, if the user adds a new record, all kinds of conditions needs to be met before "committing" the record. The problem is in List view, the user can click on another record, and the new record is automatically committed, without the checking. I know I can built in all the conditions that is not the problem.

      But it would spare a lot of work if there would be a way the user can't access another record when in "New record" mode. [ Get (OpenRecordState) = 1 ]

      Thanks in advance.

      Hans Lijnbach.

        • 1. Re: Prevent access when in "New record" mode

          Have you tried using that exact expression in the "lock expression" in the user's privilege set for this table?

          I don't know if it will work, but it seems quite possible.

          Another option: Add a "new record" popover button to your layout. The user clicks the Popover to open a panel with one global field for each regular field where they may need to enter data on the new record. Clicking a Save button inside this panel runs a script that a) creates a new record b) uses a series of set field steps to transfer the data to the corresponding fields in the new records and c) closes the popover and clears the global fields. You can also include code that checks the validity of the user's inputted data as well if that is necessary.

          • 2. Re: Prevent access when in "New record" mode

            Hai Phil,

            Thanks again for your time.

            I did try the "lock expression", but I didn't get it working properly.

            Your suggestion to use a popover button sounds like a great idea. The problem I am dealing with, is that the users for this application are teachers. And they are doing the most terrible things when they are behind a computer. They click on everything they see, even when they are in "adding" mode.

            And yes, I can write code to prevent all these things, but that is quiet a lot of work. Using a popover seems like a much better and safer idea. The validity can be built in the pop over, and that is less work then adding all kind of extra security while adding a record in the regular way.

            Thanks again Phil.

            Hans Lijnbach.