11 Replies Latest reply on Apr 7, 2013 10:15 PM by joemang1969

    Artist Inventory- adding function to create unique records for limited edition prints

    joemang1969

      Title

      Artist Inventory- adding function to create unique records for limited edition prints

      Post

           I'm designing a database to track inventory and sales of artworks

           I would like to create a script or function that will duplicate the records and add them as unique items. 

            

           For instance I have an edition of 30 prints and they need to be numbered 1/30 2/30 3/30 and so on... they are Identical pieces of art but will each be sold seperately or loaned or gifted etc...

           How can I enter the information for the edition only 1 time and create sequential records? 

           I'm producing editions of 250 and 500  so I need to identify each individual print and its collector  without the hassle of entering 500 individual items to my inventory....is there a scipt or button funtion I could create that would serve this purpose???

           Many thanks!

            

        • 1. Re: Artist Inventory- adding function to create unique records for limited edition prints
          tomoy

               I'm thinking of a field to represent the counting of 1-250 which is a serial number generated upon creation.  That way, merely adding a record will set this value incrementally and you can start or reset it to whatever you want in the field's options > auto-enter > serial number.

               Then you'd need a separate field for the total of possible editions, i.e. a number whose auto-enter value is 250.

               Then you put the two together with a calculation field = field1 & "/" & field2.  That should give you 1/250, 2/250 etc. as you simply create a new record, or duplicate an existing record. Hit 'Duplicate Record' 250 times and you're set :-)

               It's kind of a manual solution because every time you want to change the series for a different edition, you'd need to go into the field options and change the numbers (the serial for field1 and the default value for field2).  I can imagine more a more robust interface which asks you to store a global value (250) and sets the first field1 for you automatically.  Just a quick thought to look into Serial Numbers.

          • 2. Re: Artist Inventory- adding function to create unique records for limited edition prints
            joemang1969

                 It would need a field for each    like  Edition Number________ of _________ .    and I could set the second field as a different number while simultaneously creating x number of entries..  editions could be 7 or 30 or 250 or 100  so whatever the second field is it creates that many duplicate entries nubered sequentially 

                  

                  

            • 3. Re: Artist Inventory- adding function to create unique records for limited edition prints
              joemang1969

                   I'm trying a script something like this but this is completely foreign to me...

                    

              • 4. Re: Artist Inventory- adding function to create unique records for limited edition prints
                tomoy

                     Okay, sounds like you have the numbering figured.  Make sure you have the serial number setup for Edition_Number.  For setting the Edition_Total, do it manually at first - we can add it to the script later.  Create a Global number field for Edition_Total. Put it on a layout, set it to the Edition_Total you want.

                Then the script: look at Loop. It's been awhile so the syntax isn't at my fingertips but in English it should go something like this:

                     Loop
                       Exit Loop If [Edition_Number = Edition_Total]
                       Duplicate Record/Request
                     End Loop

                     First find the record you want to duplicate, make sure only one record is returned.  Then run the script.

                     Once you get the loop part down, you can play with a Custom Dialog which could guide you through the find steps to identify the record you wanted to duplicate.  Then another Custom Dialog to set the Edition_Total.  These would be optional for a power user (you), but if you wanted to give it to an assistant-type, then you'd want it fully guided via script.

                Pardon the edits - been awhile.

                      

                • 5. Re: Artist Inventory- adding function to create unique records for limited edition prints
                  joemang1969

                        still having trouble ...I've played around with options on the script but it still does not work? any suggestions 

                        

                        

                  • 6. Re: Artist Inventory- adding function to create unique records for limited edition prints
                    FranGodfrey

                         Use a script something like:

                         Show Custom Dialog [ Title: "how many issues in total in this edition?"; Buttons: “OK”, “Cancel”; Input #1: Editions::gTotal , "how many
                         in edition"; Input #2: Editions::gName, "title of work" ]
                         If [ Get ( LastMessageChoice ) = 2 ]
                         Set Field [ Editions::gTotal; "" ]
                         Set Field [ Editions::gName; "" ]
                         Halt Script
                         End If
                         Set Variable [ $count; Value:1 ]
                         New Record/Request
                         Set Field [ Editions::editionIssue; $count ]
                         Set Field [ Editions::name; Editions::gName ]
                         Set Field [ Editions::editionTotal; Editions::gTotal ]
                         Loop
                         Exit Loop If [ $count = Editions::gTotal ]
                         Set Variable [ $count; Value:$count + 1 ]
                         New Record/Request
                         Set Field [ Editions::editionIssue; $count ]
                         Set Field [ Editions::name; Editions::gName ]
                         Set Field [ Editions::editionTotal; Editions::gTotal ]
                         End Loop
                         Set Field [ Editions::gTotal; "" ]
                         Set Field [ Editions::gName; "" ]

                    • 7. Re: Artist Inventory- adding function to create unique records for limited edition prints
                      joemang1969

                           Thanks Fran,  i can see this is the right approach but its still not funtioning exactly the way I intended.

                           The item artwork name should be copied along with all the dimensions etc of the artwork including the pic  

                            

                           also the edition number is created 1-10 for example but the edition total field remains blank 

                            

                            

                      • 8. Re: Artist Inventory- adding function to create unique records for limited edition prints
                        joemang1969

                             Here are the fields I'm using as they appear...I'm hoping that the edition Number will be 1 of 10 2 of 10 3 of 10 etc... and that all fields will be duplicated for 10 records or however many total is entered on the first box when the initial record is created...

                             Thanks so much I can see a big improvement already  still a bit buggy though...

                              

                        • 9. Re: Artist Inventory- adding function to create unique records for limited edition prints
                          joemang1969

                               The script also seems to create 2 of the first record... 

                               One that has the title of artwork  the next 10 do not???

                                

                                

                               for example I enter a new record titled star and the edition number is 1 of 10   

                               the dialogues come up and I hit ok  it creates 11 records the first is named star, the next 10 are named New Item  the first is #1 the second is #1 and then 9 more 2, 3, 4,5, 6, 7, 8, 9, 10  but he edition total is blank??  

                                

                                

                                

                          • 10. Re: Artist Inventory- adding function to create unique records for limited edition prints
                            FranGodfrey

                                 My script assumed that there was no original record - that is why you are getting two of the first record in your script.

                                 The edition total field remains blank because your script omits the gTotal input in the custom dialog part of my script; the title field remains blank because your script also omits the gName input in the custom dialog part of my script.

                                 You didn't mention that you needed the image also copying into each record. Do you not just have one image per edition in a related table to avoid duplicating all the same images? The script below simply copies and pastes the image into each duplicated record - not the best method.

                                 So, for this script:
                                  
                                 Create the new record with all the required details (including the total number in the edition). The issue number field should be defined to autoenter 1 on creation of a new record.
                                 Then run this script, (first ensuring that the new record is the only record). If there are other details that need repeating in the duplicated records then add extra Set Variable lines with the data.

                                 Show All Records
                                 Omit Record
                                 Show Omitted Only

                                 Show Custom Dialog [ Title: "This edition"; Message: "Is there " & ArtInventory::Edition_Total & " in this edition?" & ¶ & "If not, cancel
                                 and amend the edition total"; Buttons: “OK”, “Cancel” ]
                                 If [ Get ( LastMessageChoice ) = 2 ]
                                 Halt Script
                                 End If
                                 Set Variable [ $count; Value:2 ]
                                 Set Variable [ $dimensions; Value:ArtInventory::Dimensions ]
                                 Set Variable [ $total; Value:ArtInventory::Edition_Total ]
                                 Set Variable [ $title; Value:ArtInventory::TitleOfArtwork ]
                                 Copy [ ArtInventory::Image ]
                                 [ Select ]
                                 New Record/Request
                                 Set Field [ ArtInventory::Edition_Number; $count ]
                                 Set Field [ ArtInventory::TitleOfArtwork; $title ]
                                 Set Field [ ArtInventory::Edition_Total; $total ]
                                 Paste [ ArtInventory::Image ]
                                 [ Select ]
                                 Set Field [ ArtInventory::Dimensions; $dimensions ]
                                 Loop
                                 Exit Loop If [ $count = $total ]
                                 Set Variable [ $count; Value:$count + 1 ]
                                 New Record/Request
                                 Set Field [ ArtInventory::Edition_Number; $count ]
                                 Set Field [ ArtInventory::TitleOfArtwork; $title ]
                                 Set Field [ ArtInventory::Edition_Total; $total ]
                                 Paste [ ArtInventory::Image ]
                                 [ Select ]
                                 Set Field [ ArtInventory::Dimensions; $dimensions ]
                                 End Loop
                                  

                            • 11. Re: Artist Inventory- adding function to create unique records for limited edition prints
                              joemang1969

                                   Thanks Fran,

                                   I took your original script and modified it to include more information and added a portal so the the image can be retrieved from the web keeping the file size more lean.  This is the script I used, very helpful but this one still includes the line to copy the image to each new file,  

                                    

                                   Thanks so much huge help!!