5 Replies Latest reply on Jun 29, 2016 10:24 PM by RickWhitelaw

    Auto entering data in portal

    sam0723

      Hello, everyone, I am new to filemaker.

      Now, I am facing a problem that is,

       

      In my database, I have a portal. I would like to automatically enter text and numbers. For example,

       

      when I choose main dish(food name field) in a portal, another field(order field) in the same portal will show beef and 'quantity field' will show the number 5.

      Is it possible in filemaker?

       

      I have tried writing a calculation value and data in field setting, but there are no words or number showing in the order field and quantity field.

       

      The calculation is like "If ( food name = "main dish" ; order = "beef" )"

       

      Could anyone tell me how to solve this problem? Thank You

        • 1. Re: Auto entering data in portal
          macwombat

          Hi.  I've attached a sample file that does what you've asked.

           

          HTH.  Chris

          • 2. Re: Auto entering data in portal
            sam0723

            Thank you Chris.

            Could I use a text field instead of calculation as I prefer to have a drop down value list

            • 3. Re: Auto entering data in portal
              dj1up

              Hi Chris,

               

                  I am still very new to FM but i looks like you will need a Join Table.  Also make sure that each table has a Primary Key.  You should have this set up to auto enter each time a record is created for that table.  Your solution is very bare.  Only one table has fields that hold data other then the primary key field.  So its hard to understand what you are trying to accomplish.  Planing is very important and writing out in words what you are trying to do would help you understand what you will need to do as far as setting up your tables.  Sorry if this isn't that helpful but there's just more you need to do as far as planing and setting up your tables before I can understand what your trying to do.

              • 4. Re: Auto entering data in portal
                macwombat

                The sample file was put together in response to the original question to demonstrate the technique that achieves what the original poster asked.  It does that.  It was not designed to be perfect example of how to do everything else in FM.

                • 5. Re: Auto entering data in portal
                  RickWhitelaw

                  Your comment is not appropriate considering the reason Chris put together this sample file. As far as having a table with a PK and only one field containing data goes, this seems like ideal normalization!