7 Replies Latest reply on May 28, 2014 11:31 AM by Stephen Huston

    Entering Data in Popover (need guidance)

    thong127

      Hello All,

       

      Just upgrading to FMP 13 and working on a pop over to enter my data. When I Create a new record button, my previous entries are still there on my popover. how can I enter my new records without showing my old entries in my popover.

      any help and suggestions are appreciated.

       

      Thank you.

      thong

        • 1. Re: Entering Data in Popover (need guidance)
          bigtom

          Not sure how it is setup. I am always getting empty fields in new records with popovers.

          • 2. Re: Entering Data in Popover (need guidance)
            jbrown

            Good evening.

            If the values from the previous record are in the fields, then you must not really be creating a new record, or the record that is active is NOT the new record. The popover will display data from the record that is active.

            Again, if you explain more about how it is set up, then people here would be able to help out. If you're on a form view or list view, that's certainly worth knowing.

             

            One of the better ways to create new records in a popover is to use global fields in the popover. At the bottom of the object is a "Submit" button which then actually creates the new record and writes the data from the globals to the real fields.

            For example, I'd have a First_g and Last_g global field in my popover. When I press "Submit", the script creates the new record and places whatever is in First_g into FirstName field and so forth.

             

            After the data has been transferred from the gloabls to the real fields, the globals should be cleared out. That way they never contain any previously-entered data.

             

            I think this is a pretty standard way to create a new record.  Give it a try.

            • 3. Re: Entering Data in Popover (need guidance)
              thong127

              Good Mornig Everyone,

               

              Im on the Form View,

               

              Here are the sample of my fields based form your sugsestion,

               

              Field Names                                          Type

              Supplier Name                                         Text

              Manufacturer Name                                  Text

              Manufacturer Lot No.                                Text

               

              Supplier_name                                         Global

              Manufacturer_name                                  Global

              Manufactuer_lot no.                                  Global

               

              My Script for add Supplier Button

               

              Set Script Animation [On]

              Go to Object[Object Name:"Add Supplier"]

              New Record/Request

              Set Field[Supplier::Supplier_name;Supplier Name]

              Set Field[Supplier::Manufacturer_name;Manufacturer Name]

              Set Field[Supplier::Manufacturer_lot no.;Manufacturer Lot No.]

              Commit Record/Requests

               

              Clean Globals

               

              Set Field[Supplier::Supplier_name;""]

              Set Field[Supplier::Manufacturer_name;""]

              Set Field[Supplier::Manufacturer_lot no.;""]

               

              Thank you.

              Thong



              • 4. Re: Entering Data in Popover (need guidance)
                flybynight

                When you run the "add Supplier" script, are you also running the "Clean Globals" script? If you aren't explicitly clearning them, then that is what you are still seeing the previous values when you create a new record. Your global fields don't clear automatically just because you set a field with their values.

                 

                HTH,

                -Shawn

                • 5. Re: Entering Data in Popover (need guidance)
                  Stephen Huston

                  It also matters which layout you are on when you execute the New Record script step. If you are  creating a related record, you need to go to a layout based on the correct related table, not a TO of a parent record, or the new record will execute in the wrong table. Then you can switch back to edit the related record if there are related fields for the new record on the parent record layout.

                  • 6. Re: Entering Data in Popover (need guidance)
                    thong127

                    Hello,

                    How about if my script is like below,

                     

                    I Add Perform Script Clean Globals.

                     

                    My Script for add Supplier Button

                     

                    Set Script Animation [On]

                    Go to Object[Object Name:"Add Supplier"]

                    New Record/Request

                    Set Field[Supplier::Supplier_name;Supplier Name]

                    Set Field[Supplier::Manufacturer_name;Manufacturer Name]

                    Set Field[Supplier::Manufacturer_lot no.;Manufacturer Lot No.]

                    Perform Script [Clean Globals]

                    Commit Record/Requests

                     

                    Clean Globals

                     

                    Set Field[Supplier::Supplier_name;""]

                    Set Field[Supplier::Manufacturer_name;""]

                    Set Field[Supplier::Manufacturer_lot no.;""]

                    • 7. Re: Entering Data in Popover (need guidance)
                      Stephen Huston

                      It appears you are setting only global fields after creating a new record, then clearing those same global fields. What effect are you hoping to accomplish in any non-global fields of an actual record?