Database Designs Posted July 26, 2012 Share Posted July 26, 2012 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. Link to comment Share on other sites More sharing options...
eos Posted July 26, 2012 Share Posted July 26, 2012 Why don't you import them several times? Link to comment Share on other sites More sharing options...
Database Designs Posted July 26, 2012 Author Share Posted July 26, 2012 Some of the records only need to be in the table once. Others twice and others 3 times. Link to comment Share on other sites More sharing options...
eos Posted July 26, 2012 Share Posted July 26, 2012 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. Link to comment Share on other sites More sharing options...
bcooney Posted July 26, 2012 Share Posted July 26, 2012 I am suspicious of the need to have so many duplicate records. It raises a red flag to me. Link to comment Share on other sites More sharing options...
Database Designs Posted July 26, 2012 Author Share Posted July 26, 2012 I did import different found sets as you suggested and it works great. Thanks. Link to comment Share on other sites More sharing options...
comment Posted July 26, 2012 Share Posted July 26, 2012 I am suspicious of the need to have so many duplicate records. It raises a red flag to me. Me too. Though it reminds me of: http://fmforums.com/forum/topic/42423-creating-small-label-printing-database/page__view__findpost__p__197906 Link to comment Share on other sites More sharing options...
Opotoc Posted July 26, 2012 Share Posted July 26, 2012 Two solutions for your problem: 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. I use this a lot to split reports into subsets, it's quite handy. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 4285 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 accountSign in
Already have an account? Sign in here.
Sign In Now