May 15, 201213 yr Hello , i have POrders layout with some repeating fields, now when i try to start the script to copy some fields to a related layout , why the script only copies the first row of the field? im doing something wrong? here i attached you the sample, thanks for you help POrders.fp7
May 15, 201213 yr I am unsure about what you are asking but here are two things. 1. You can grab a repetition of a field by using GetRepetition(repeatingField;number) 2. You shouldn't be using repeating fields for something like this. Use a related table instead. You can use a portal to display the related records.
May 15, 201213 yr I would not do a PO system this way, I would create a table for the line items and access them from their.. however if you want to do it your way, you need to add to your script set field[production::total;POrders:total] you need one of these for each repetion ie... set field[production::total[2];POrders:total[2]] set field[production::total[3];POrders:total[3]] ... etc.... or you can use a loop to set them all as variables whichever is easiest for you. hope this helps..
May 17, 201213 yr Author Hello , thanks for all your reply , it works as FMP12 says. Actually is not a PO solution , its a manufacturing order that only accepts 3 colors, i choose repeating fields instead a portal just to prevent users to create new rows.
May 17, 201213 yr […] that only accepts 3 colors, i choose repeating fields instead a portal just to prevent users to create new rows. I also recommend using a child table. When you define a relationship for the child table and deselect the option “Allow creation of records via this relationship”, you can set up a portal that has no empty last portal row, which prevents your users from creating new child records, i.e. portal rows.
Create an account or sign in to comment