Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Can I create portal records using the replace option?


This topic is 5234 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

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.

Posted

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

Posted

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.

Posted (edited)

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 by Guest
Posted

The alternative is to have a category checkbox field in Products, where the value list comes from the Category table.

This topic is 5234 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.