1 2 Previous Next 20 Replies Latest reply on May 10, 2016 2:08 PM by user26927

    Quick Question

    user26927

      I am creating an inventory management database.

      I want to be able to assign a product to a bin location in our warehouse.  One product can only be in one bin....so there is a 1 to 1 relationship. 

      I read that 1-1 should not be a separate table but rather a field on a layout.

       

      I want to make sure only one product ever gets assigned to a particular bin.

       

      Should I create a pick list on the product layout and have all of our bin locations listed....then the user will select the bin where that product lives from the value list?  If so...how can I make the bins that are already assigned products be excluded from the value list?

       

      Or should I go ahead and create a new table (warehouse) and create records for each bin and relate them to the product?

       

      Thanks for the advice

        • 1. Re: Quick Question
          jgomes384

          Why not put the bin assignment in the same table and use Validate: Unique only? This will keep anyone from entering the same bin multiple times.

           

          -Jason

          • 2. Re: Quick Question
            erolst

            user26927 wrote:

            Or should I go ahead and create a new table (warehouse) and create records for each bin and relate them to the product?

            If you have more to say about bins than the fact that they exist, or you want to have a handy checklist of bins that should/can be managed without digging into value lists … then you should create a table.

             

            But either way, this is not really a one-to-one relationship, but rather

             

            Bin --< Product

             

            because a bin can store many products – just not simultaneously. So a bin is an attribute of a product, which means: put a field into product to store the bin name / ID (depending on your approach).

             

            user26927 wrote:

            how can I make the bins that are already assigned products be excluded from the value list?

             

            With a table, you could

             

            • create Product x Product_self

            • create a calc field (text) as Let ( theList = List ( Product_self::id_bin ) ; Case ( IsEmpty ( theList ) ; 0 ; theList ) )

            • relate Product::cListOfBinsUsed ≠ Bin__forVL::id

            • create a value list as 1. Bin__forVL::id, 2. Bin::name, show second only, starting from Product

             

            While the validate approach is a good idea, I would use it in addition to the strategy of only offering unused bins – don't show messages for errors that should have been prevented in the first place.

            • 3. Re: Quick Question
              user26927

              Thank you erolst.

              Im going to get busy doing as you suggested. 

              I have a few questions-

              With a table, you could

               

              • create Product x Product_self

              Is this a table occurrence with a cartesian join?

               

              You lost me a little with-

              • create a calc field (text) as Let ( theList = List ( Product_self::id_bin ) ; Case ( IsEmpty ( theList ) ; 0 ; theList ) )

              • relate Product::cListOfBinsUsed ≠ Bin__forVL::id

              • create a value list as 1. Bin__forVL::id, 2. Bin::name, show second only, starting from Product

               

              I apologize....Im am new to filemaker and trying to learn as much as I can

               

              thank you

              • 4. Re: Quick Question
                erolst

                Have a look into the attached sample file.

                • 5. Re: Quick Question
                  user26927

                  I don't know how to thank you.

                  I really appreciate the help.

                   

                  What is the difference in using:

                  UUID vs Serial Number ?

                   

                  Are there advantages to one over the other?

                  • 6. Re: Quick Question
                    erolst

                    user26927 wrote:

                    What is the difference in using:

                    UUID vs Serial Number ?

                     

                    Are there advantages to one over the other?

                     

                    See this thread:

                     

                    UUID v. Serial Numbers

                    • 7. Re: Quick Question
                      user26927

                      erolst-

                       

                      I analyzed your sample database and retraced your steps in my database. 

                      The buttons and scrips appear to be working BUT I am having one issue:

                       

                      The popover displays all bins and allows me to select a bin that is already assigned to a product.

                      Does this mean there is an issue with he calc that generates the list of used bins?

                       

                      Screen Shot 2016-05-10 at 10.13.10 AM.png

                       

                      Screen Shot 2016-05-10 at 10.13.32 AM.png

                      • 8. Re: Quick Question
                        erolst

                        user26927 wrote:

                        The popover displays all bins and allows me to select a bin that is already assigned to a product.

                        It worked for me …

                         

                        Did you recreate the script correctly? The portal display must be refreshed for the list to be correct; if you use a Refresh Portal step, then the portal must have a name.

                        • 9. Re: Quick Question
                          user26927

                          Maybe there is an error in the script....

                          I did name the portal because I opened the portal with a button and go to object script step....so I think it is named correctly.

                           

                          Screen Shot 2016-05-10 at 10.35.24 AM.png

                          • 10. Re: Quick Question
                            erolst

                            You must also specify this script for the OnObjectEnter script trigger of the popover panel (not the button), using the parameter "enter".

                             

                            You click the popover button, the popover panel is opened, the attached trigger starts the script, script finds block with parameter "enter", and refreshes the portal … that's the theory.

                            • 11. Re: Quick Question
                              user26927

                              Alright-

                              I have the script trigger set to run on object enter with the script parameter "enter" on the popover panel.

                               

                              I have the scrip trigger set to run on the actual bin portal row in the popover with the parameter set to "select"

                               

                               

                              It still doesn't work right.  I can see all bins and select bins with products already associated to them

                              • 12. Re: Quick Question
                                erolst

                                If you like, post your file and I'l have a look at it.

                                • 13. Re: Quick Question
                                  user26927

                                  Well to be quite honest with you I cant figure out how to send you the file.

                                   

                                  It is hosted on fm server.  When I make updates I am updating the live hosted copy.

                                  How do I get a copy of that from the server for you?

                                  • 14. Re: Quick Question
                                    user26927

                                    I added the c.listofusedbins to the layout like you did just to see if they were adding up there.  They are not.

                                    No bins ever get added to the list of used bins. 

                                     

                                    Does this mean there is an issue with the calculation?

                                    1 2 Previous Next