10 Replies Latest reply on Apr 17, 2014 9:00 AM by philmodjunk

    Generating new data within FMP13

    LightningAd

      Title

      Generating new data within FMP13

      Post

           Being a very green newbie to developing a dbase, i'm not quite sure what the correct terminology is for many of the things i want to achieve, so apologies in advance if this request gets confusing....

            

           I want to create a database that i can enter specific details for an overall "parent brand", then using various generic fields in that Parent generate individual files for specific versions.

           I make tv ads, and have one master ad, then 5 variations each with a different tag for the stores that sell the product. Each ad will use a large amount of repeated data, but each will also need to have its own unique data. (Each needs a unique clock in the format " ABC/DEFG123/020", as well as keeping track of which stations have copies for transmission, and approvals, etc)

           I want to be able to use a checkbox to select the variations i need, then at the click of a button have FMP generate a new entry for each selection, along with a unique Clock Number (It needs to check that there has not been an identical clock generated previously, and if so, create a unique new one), and fields for adding relevant info later on.

           Can anyone give me any pointers or hints at what i need to research to figure this out? 

           I realise this is probably way above my abilities, but if you dont try, you dont learn!

            

           thanks

           Adam

            

            

        • 1. Re: Generating new data within FMP13
          philmodjunk
               

                    I want to create a database that i can enter specific details for an overall "parent brand", then using various generic fields in that Parent generate individual files for specific versions.

          Files? why do you want to make individual files? Don't you need to create individual records in a related table instead?

               With a related table, you can use fields in that related table to document details specific to that one add. Data that is common to all the ads can be put in field in the parent table record so that you do not have to duplicate that information. And information that is usually common to all or most ads linked to a given parent can be looked up (copied) from the related parent record but then modified in the individual ad record in cases where you need to make a change specific to a particular ad.

          • 2. Re: Generating new data within FMP13
            davidanders

                 There is basic information on designing and constructing databases in the first five links here

            http://forums.filemaker.com/posts/f6ed4be796?commentId=222931#222931

            • 3. Re: Generating new data within FMP13
              LightningAd

                   hi Phil, like i said...i may get the terminology wrong! I am using a relational setup to store the various records... i'm unclear on the distinction between a file and a record.

                   ...amongst the many comfusions i have trying to self-learn this discipline is figuring out how to achieve the ideas in my head!

                   The one currently occupying me is how i can make a layout that contains all my generic data for a brand, but also uses a checkbox to select the variants, and then generates the individual code numbers and new records for each selection, which in turn will allow me to add specific data pertinent only to the individual record.

                    

                   David - thanks for links. Very useful info.

                    

                   adam

              • 4. Re: Generating new data within FMP13
                philmodjunk

                     Files are computer files what you see when you open a directory or folder on your computer and look inside. A FileMaker database can be built from a collection of files, but that's not an approach for a beginner to use.

                     

                          The one currently occupying me

                     With the two table system that I described, you can set up a record in the parent table and then create a related record for each "variant" that you want of that ad. You can go to a layout based on the table of ad variations and that layout can include fields from parent record to show the basic info, but this layout can include additional fields--such as your check box field for recording specific details about that ad variation. Calculation field can also be defined in that ad variation record to compute your "codes" from data in both the parent and ad variation records.

                • 5. Re: Generating new data within FMP13
                  LightningAd

                       thanks Phil,

                       i seem to be making some progress...

                       I've managed to fix the script for the 15 digit Clock number (somehow that one has eluded me for years!..but now i have it working right).smiley

                       I have tried using a Checkbox on the Parent Table to create a set of variant records, but i cannot seem to get that to work, so i am trying to make a set of buttons to select each variant, with a script to trigger the creation of the new record on the Clock table.  Its partially working, but still a long way from whats needed. Ideally, each new variant will show up in a window on the parent layout, as both the new clock number and its tag name. I want all clocks for a given product to appear in this window.

                       Ah well, perserverance is the watchword!

                        Its my total lack of knowledge relating to anything databasey thats the main problem! And as for scripting...i'd probably do as well conversing in Klingon, so thanks for your patience.

                       adam

                  • 6. Re: Generating new data within FMP13
                    philmodjunk
                         

                              I have tried using a Checkbox on the Parent Table to create a set of variant records, but i cannot seem to get that to work,

                         That is not what I suggested. I suggested that you create a new record in the table of variants linked to a specific parent record and then use other fields--such as a check box formatted field--to specify the details of that variant.

                         Here's an example: Say you have a database of items purchased at a well known fast food franchise. The parent record describes the basic type of hamburger (Big Mac) and the basic details common to all versions of that hamburger. (Two all beef patties, 3 buns...) The variations records linked to it would have fields to describe the possible variations. (Ketchup, special sauce, lettuce, pickles....)

                    • 7. Re: Generating new data within FMP13
                      LightningAd

                           If i understand correctly, wouldn't that method require creating each variant individually?

                           I don't think your analogy works for what i need, as the variations would not be things a checkbox could add (they would be things like approval documents held in container fields, or copies of the actual video file relevant to that variant).

                           My thinking was a checkbox would let me select say 5 stores. Then clicking a button to initiate the clock generation would trigger a script that created 5 records, and generated a unique clock number to be stored in each record as well as adding the specific store name to the record. It would also create the unpopulated fields for other documents that would be added at a later date. 

                           Reading further into scripting, i think my method is going to change to using a button for each variant, with a script that uses the clock calculation within a Set Variable to generate a new clock number and a new record in the variants table.

                      • 8. Re: Generating new data within FMP13
                        philmodjunk
                             

                                  If i understand correctly, wouldn't that method require creating each variant individually?

                             Yes and that's what you should do here. Each is created as an individual record but linked to a common parent record to avoid entering data common to all variations more than once.

                             

                                  I don't think your analogy works for what i need,

                             I used check boxes because you had described doing this with check boxes. You don't have to use check box formatted fields in order to do what I am recommending. That is just one option for one kind of data entry.

                             

                                  My thinking was a checkbox...

                             That could be done, but I don't think that a check box formatted field is your best option. The list of "stores" is likely to be a list that changes in number of stores listed and a check box formatted field has a fixed size that won't increase automatically if you add more stores to your list pm a future date. Adding a related table of stores, on the other hand, could be made to work for making multiple selections.

                             

                                  i think my method is going to change to using a button for each variant,

                             This requires that you change the design of your layout every time your list of possible variations changes. I suggest instead that you set up a portal to the variations table on your parent record layout. You can create the needed variation records with them automatically linked to the correct parent record just by selecting the needed details that you want for that variation in fields shown in the portal. This can be done with no scripting at all.

                             PS. you've described generating a "clock number" here. If that's what you need for purposes outside the function of your database then by all means, you need a field for generating that value. But I recommend that you NOT use this field as a match field to other records in your database. Use an auto-entered serial number field to uniquely identify each record in a given table to serve as your primary key for that table.

                        • 9. Re: Generating new data within FMP13
                          LightningAd

                               The "clock number' is nothing to do with the database functions, and is definitely NOT being used for any Primary or Foreign keys!…its a unique 15 character code required by TV broadcasters to identify a specific commercial.

                               I think what you have described is pretty close to the original database i came up with and have been using for several years - I create a new record, use a button to copy some details from the previous record, then add the store ref and move on to create next record. Its a long winded process when i have several ads to make, this can often require me to create and adjust 15-20 records one after the other...

                               I am trying to find a way to generate multiple records, with a new clock number for each record, from as few steps as possible. I realise now that a check box only looks like the right option but doesnt seem to work "under the hood" as i would like.

                          • 10. Re: Generating new data within FMP13
                            philmodjunk

                                 There's a key difference though. By using a "parent record" there should be no need to copy data from the previous record as that data should already be present in the parent record and not need to be copied.