Duplicate some records via Loop

Recommended Posts

I am importing records from another table. When I import them in if the "Spaces Allotted" field equals 2 than I need the record to be duplicated, if it equals 3 then I need it duplicated twice. I can Loop through and duplicate the record if "Spaces Allotted" = 2, but I'm having trouble if it =3 and also duplicating the last record if it needs it. Any help would be appreciated.

Share this post

Link to post

Share on other sites

You could import different found sets from the source table, based on different values of the “allotted” flag; i.e. go to source, find all allotted, go to target, import, go to source, search for allotted = 2, go to target, import, etc.

Share this post

Link to post

Share on other sites

1. Looping: open an new window, duplicate, close window. So your found set will stay the same. If you need it duplicated twice do this twice. Make sure that you do not use show all records (use a static found set, can be all records as well).

2. Add a repeating field to your source table. If you need duplication enter something in the first and second repetition, if you need the record three times put a value in repetition 1/2/3.... On import you may chose to spilt repeating fields into single records, so you get indention info on all records except for the contents of the repeating field.