4 Replies Latest reply on Aug 30, 2012 6:00 AM by BruceHerbach

    Allowing data entry while prohibiting editing or viewing of records

    purpleferret79

      Hi, I'm working with Filemaker Pro 12 and have a set of instructions related to this question for an older version of filemaker. I've tried following the instructions including setting up global fields and then creating what they call a "I'm Done" script. Basically what I'm trying to create is a layout that allows one to enter new records only. I do not want to be able to view or edit any records in this layout. I also want the fields to be blank and ready for data entry when someone enters the layout. I have tried creating a button with a script like this:

       

      New Record/Request

      Set Field ['Name','Global Name']

       

      The previous instructions from filemaker also said to add Clear ['Global Name']. This seems to work well in clearing my data and leaving a table with a bunch of blank rows, and no new record in my main table. This is not what I want to do though.

       

      How can I set up a layout so it opens with a new blank record (all ready for data entry), that then (when closing or clicking a button) adds this information as a new record to my main table? Can anyone help with this?

        • 1. Re: Allowing data entry while prohibiting editing or viewing of records
          BruceHerbach

          Hi,

           

          I think you have a start. So building on what you described,  try the following:

           

          1. As you described create a Global field for each real field in the record.
          2. Create a Data Entry layout with all of the Global fields, a "Done" button and a "Cancel".
          3. On the layout where the user will start add a "New Record" button
          4. Create a Script for the "New Record" button that does the following:
            1. Uses Set Field and sets the values of all of the Global fields to "".  This will clear any left over information from the global fields
            2. Open a New Window
            3. Switch to the Data Entry Layout
            4. Pause the script idenfintly.  This forces the Data entry window stay in front until the user is finished.
          5. Create a "Cancel" scrip and attach it to the Cancel button on the Data entry layout. The script should do the following:
            1. Closes the Current Window
            2. Halt script:  This will terminate New Record Script
          6. Create a "Done" script and Attach it to the "Done" button. It should do the following:
            1. Confirm that all of the fields have valid data.  If not exit the Done script with a Dialog box telling the user what to do.
            2. If the Data is ready, change layouts to one where you can create the real new record
            3. Create the record
            4. Using Set field,  Populate all of the fields with the data in the Global fields.
            5. close the window
            6. Refresh the screen so that the main layout is updated
            7. Halt the script. This will terminate the "New Record" script

          HTH

          Bruce

          • 2. Re: Allowing data entry while prohibiting editing or viewing of records
            comment

            Give your users the privilege to create new records, but deny them viewing (and editing) privileges. That's pretty much all you need to do - except some cosmetics to hide those ugly <no access> labels. This should be easy to achieve by making sure the found set is always empty.

            • 3. Re: Allowing data entry while prohibiting editing or viewing of records
              purpleferret79

              Hi, thanks for all your suggestions. I think the main thing I'm having trouble with is finding the right script that transfers what I type in the global fields from the layout, into the regular fields in my table. No matter what I try I can't seem to get the data transfered to my main table Do you know what script will do this?

              • 4. Re: Allowing data entry while prohibiting editing or viewing of records
                BruceHerbach

                If you can post your file and I'll take a look. 

                 

                Make sure that you have a setfield step for each field in the record.  should be:

                setfield[table::fieldname; table::Globalfieldname]

                 

                Bruce