Creating copies with a difference

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Mark HHP
Posts: 387
Joined: Mon May 06, 2013 6:59 am
Location: Cape Town, South Africa

Creating copies with a difference

Post by Mark HHP »

Hey,

I have a BookList BO. This gets created every month. At the moment, I create one, set the month (issue) and the magazine.

This creates a BookList which is autopopulated by a series of articles which appear in every issue. I then duplicate this BookList and change the magazine.

Question: is there a way to create one BookList and then duplicate with the three other magazines specified?

Like CREATE BookList WITH BookList.Issue=?Issue AND BookList.Magazine='JHB'

But then where to from there? I want it to create three more with Magazine='CPT' 'DBN' 'PTA' but not have to choose issue each time
Mark
Running V5.7 (Build 1714) Linux Server. MySQL
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: Creating copies with a difference

Post by BenHayat »

Mark HHP wrote: But then where to from there? I want it to create three more with Magazine='CPT' 'DBN' 'PTA' but not have to choose issue each time
Are CPT, DBN and PTA. created in another object, i.e. "IssueType"? If yes, I'd iterate through the IssueType Object, and based on each iteration, I'd create like:

Code: Select all

CREATE BookList WITH BookList.Issue=IssueType AND BookList.Magazine='JHB'
Note: it's best to stay away from Magic strings like 'xyz' or 'abc' and etc.
Hope this helps!
Mark HHP
Posts: 387
Joined: Mon May 06, 2013 6:59 am
Location: Cape Town, South Africa

Re: Creating copies with a difference

Post by Mark HHP »

Hi Ben,

Thanks for this. The Issue is plain text attribute (usually something like September 2016) and the Magazine attribute is a dropdown of the four: JHB, CPT, DBN and PTA. So on creation I would fill in the Issue and it would create the 4 BookLists with the different magazines.
Mark
Running V5.7 (Build 1714) Linux Server. MySQL
Post Reply