July 25, 201015 yr I have a product database with two tables, "products" and "productCategories". The productCategories table is setup as a portal in my products database. I have a found set in my products database (let's call the found set "Posters"). I want to assign all of the records in the found set to two different productCategories, "Movie Posters" and "Science Fiction". Is there any way that I can do this using the replace command without having to create a looping script to create each related record?
July 25, 201015 yr You mention two tables, but I see the need for three: Products, Categories, and a join table to store the combos of Products and Categories, ProdCat. (If each product can be assigned more than one category). The portal on Products should be to Prodcat. In this table you need a ProductID and a CategoryID. The CategoryID can be formatted to be a popup menu using values from Category (ID, Name). Read up on join tables.
July 25, 201015 yr No the replace script step is one of those not capable of doing so ... but investigate the template and see for your self the method is the same ... but replace can't enter values in a not yet created records a relation away - but applescript does though - but Imports between internal table does it as well - investigate template: --sd test.zip
July 25, 201015 yr Author No the replace script step is one of those not capable of doing so ... but investigate the template and see for your self the method is the same ... but replace can't enter values in a not yet created records a relation away - but applescript does though - but Imports between internal table does it as well - investigate template: --sd Thanks for the sample Søren, as usual you are operating on a whole other level.
July 25, 201015 yr Author You mention two tables, but I see the need for three: Products, Categories, and a join table to store the combos of Products and Categories, ProdCat. (If each product can be assigned more than one category). The portal on Products should be to Prodcat. In this table you need a ProductID and a CategoryID. The CategoryID can be formatted to be a popup menu using values from Category (ID, Name). Read up on join tables. You are one step ahead of me. Just building it now. Thanks! Edited July 25, 201015 yr by Guest
July 25, 201015 yr The alternative is to have a category checkbox field in Products, where the value list comes from the Category table.
Create an account or sign in to comment