7 Replies Latest reply on Jun 10, 2010 8:19 AM by mendre

# Portal calculation problem

### Title

Portal calculation problem

### Post

FM11 Pro Trial for Windows.

I create a portal01 that include the info of every builds. Different builds have the same or different items list. The info in this portal1 doesn't change.

Example: (“b_item”, b_description, b_qty”)

Build: “Car Toy”

List: “01”, “car tires”, “4”

“02”, “doors”, “2”

“03”, “bumpers”, “2”

“04”, “hood”, “1”

Then create another portal02 that generate a Work Order and take the info from portal01 and calculate the amount needed. I input the amount for "Build Qty=c_buildqty" this amount change from job to job.

Example: (“c_item”, c_description, c_qty”, “c_qtyforbuild”)

Build: “Car Toy” Build Qty: “100”

List: “01”, “car tires”, “4”, “400”

“02”, “doors”, “2”, “200”

“03”, “bumpers”, “2”, “200”

“04”, “hood”, “1”, “100”

The problem is that when it calculate “c_qtyforbuild” (c_qtyforbuild=c_qty * c_buildqty) it will put the total from line 1 in the rest of the lines.

Example:

List: “01”, “car tires”, “4”, “400”

“02”, “doors”, “2”, “400”

“03”, “bumpers”, “2”, “400”

“04”, “hood”, “1”, “400”.

I'm new to FM. Tha data is going to be used between 3pc over the network on the same location.

• ###### 1. Re: Portal calculation problem

Check that all the fields in the portal are from the correct relationship.

• ###### 2. Re: Portal calculation problem

How can i check this (Check that all the fields in the portal are from the correct relationship.)?

I deleted the tables and re create them and got the same error...

• ###### 3. Re: Portal calculation problem

Sometimes we duplicate items on a layout, or use copy and paste, and then forget to change a field to point to the correct Table Occurrence. So my thought was to examine each field in the portal and verify that it's the field you think it is. I don't know for sure if that is the problem here; it's just a first step in troubleshooting.

• ###### 4. Re: Portal calculation problem

I  need understand your table structure more clearly. Can you attach a picture of your relationship graph?

• ###### 5. Re: Portal calculation problem

here is a link to the file BPList. When you go to Pick List and change Units Needed you will see mi problem.

• ###### 6. Re: Portal calculation problem

I was right, you had a field from the work order in the line item portal. But that's only part of the problem.

Each work order has a unique ID (primary key). The lines in the work order portal should relate to the work order based on that key. But you don't have a field in the line items (BOM_LINES) to store that key.

Once you have the relationship set up correctly (pk_WO=fk_WO), look at how you have it set to allow creation of work orders from the line items, which seems exactly backwards to me. One WO has many items. It's the items that should be created from the work order, if you're going to do it via an allow-create relationship.

I see other problems, but start there.

• ###### 7. Re: Portal calculation problem
Thanks for your help Fitch. I try that with no success. Create new database trying to use only (pk_WO=fk_WO) and still not working..... I don't get it.... Will try again to see.