Jump to content

Creating new records via portal


malagasy

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

Recommended Posts

I have a database with the following tables:

Customers

Orders

Products

I have done a layout for the order that is linked using a relationship to the customers table (Customers::CustomerID linked to Orders::CustomerIDfk). It works fine

However, I have also done a portal in order to select the different products bought by a customer. I have established a relationship between the order table (Orders::ProductIDfk) and the Product table (Products::ProductID).

I want to be able in my order layout to add records via the portal but it doesn't work.

What am I doing wrong :

Hope you can help...am i missing something ?

Edited by Guest
Link to comment
Share on other sites

In your relationship between the order table (Orders::ProductIDfk) and the Product table (Products::ProductID), do you have the option of allowing creation of records checked?

Link to comment
Share on other sites

Can you get the following screen shots:

1. The portal in layout mode

2. The portal in browse mode

3. The Realtionship diagram

4. The relationship dialog box for the relationship in question

Link to comment
Share on other sites

You are missing a line items table that should be a join table between your orders and the products. In other words, the Order table will have the CustomerID, and on one of its layouts, a portal to the lineitems table with 'Allow Creation of Records' checked.

Link to comment
Share on other sites

It worked - Thanks John and everyone else for your help.

For future reference,


A [color:red]Line_items Table needs to be created (as john just said).

In my case, I included the fields

[color:red]LineItemsID

ProductsfkID

OrdersfkID


2 relationships need to be created between:

1/[color:blue]Orders::OrderId --> [color:red]Line_Items::OrdersfkID

'Allow Creation of Records' needs to be checked on OrdersfkID side

and

2/[color:red]Line_Items::ProductsfkID --> [color:yellow]Products::Products


In my layout, I have created a portal showing related records from the [color:red]Line_Items table.

Then, include the field [color:red]Line_Items::ProductsfkID and the field you want from the [color:yellow]products table.

You should be able to records new entry in your portal and by typing the product ID in the ProductsIDfk field, you should have the other fields appearing automatically.

Hope this help

Edited by Guest
Link to comment
Share on other sites

This topic is 6331 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.