3 Replies Latest reply on Feb 23, 2013 1:13 PM by flybynight

    Looking for help for scripting



      I am a newcomer to FileMaker Pro and maybe already way in over my head, but it's worth a try.

      I am creating a database for a small company selling "tools". What is important for them is always to be able to sort the tools, first by "manufacturer" and second by "categories". I have created 1 table (for the moment) with: manfacturer, category, tool name, tool number, price, etc ... . I will in time created additonal tables such as: customer, order, lineitem (I am basing myself on the FileMaker 12 training modules).

      At this point, I think I need a script for the followings:

      1. In the detail view layout (see below) which I want to use to create new records, I want to have is a "value list" for my "category" field, which is linked to the "value list" manufacturer?

      Detail view.jpg

      2. In the List view layout (see below), I want to be able to sort my list, again first by the manufacturer "value list", which will give me the corresponding category "value list"?

      Liste view.jpg


      I have been debating if I should created a "manufacturer" table now (I believe I will need later on if I want to be able to create invoices/orders by manufacturer) but that still leaves me totally perpelexed on how to link my category "value list" to a specific manufacturer.


      I appreciate any help or reading recomendation on this.


      Kind regards,



        • 1. Re: Looking for help for scripting



          Value lists come in two basic types.  Simple,  where you create the list and type in all of the values and Relational where you select a table::field and use the values in the field.  The relational can be based on a relationship to the current record and base the value in the field that is linked to.  So for the most part you don't need a script to create a value list.


          At this point I would recommend that  take a step back and create the tables your solution will require.  Then create basic relationships between the table ocurrences in the graph.  Once these are in place you should be able to add Value lists either based on a records in a table or based on the relationship between two tables. 


          Using the Training guide as a learning tool is a good first step to doing this.


          • 2. Re: Looking for help for scripting



            Thank you for your help, especially about the step back  

            • 3. Re: Looking for help for scripting

              Will each manufacturer have it's own categories? Or will categories be generic and cross all manufacturers? I'm thinking of things like "power tools, hand tools, hardware, etc..." but you may have something different in mind that is manufacturer specific.


              You can have a value list based on the same field that is using it, and then use a drop-down menu in our interface. That way, the user will see other categories that are already in there, but still be able to add categories as needed. Those new categories will become part of the value list.


              For your list, I'm thinking of a sub-sumary report, sorted by Manufacturer, then by Category.


              Having a Manufacturer table in place now will be easier in the long run, but not impossible to add later either. You can add that table, and a foreign key field to your product table, then create a script that loops through your products, checks for matches in Manufacturer, copies the Manufacturer primary key and put that into the corresponding foreign key. Depending on how far along you are, not ideal… just not impossible.


              Good luck!