rgreenidge Posted November 22, 2010 Share Posted November 22, 2010 I have a job that has four different coupon values, 10% off, 20% off, 25% off, and 50% off. Each value requires an exact number of coupons for example: 10% off - 1,000 20% off - 250 25% off - 300 50% off 100 I need to compose a file that randomly uses the coupon values with the exact amounts required. Is this something that is possibly in Fusion Pro. Thanks in advance. Richard. Link to comment Share on other sites More sharing options...
scubajbc Posted November 22, 2010 Share Posted November 22, 2010 I have done something similar before but I didn't do it in FusionPro, I did it in Excel. I just created a field, assigned the offers in the correct amounts, and mixed them up. Link to comment Share on other sites More sharing options...
rgreenidge Posted November 23, 2010 Author Share Posted November 23, 2010 Thanks scubajbc, I'll give this a try. Thanks, Richard. Link to comment Share on other sites More sharing options...
esmith Posted November 23, 2010 Share Posted November 23, 2010 I have a job that has four different coupon values, 10% off, 20% off, 25% off, and 50% off. Each value requires an exact number of coupons for example: 10% off - 1,000 20% off - 250 25% off - 300 50% off 100 I need to compose a file that randomly uses the coupon values with the exact amounts required. Is this something that is possibly in Fusion Pro. Sure. You just have to set the repeatRecordNumber to the quantity for each unique coupon in an onRecordStart callback rule. Link to comment Share on other sites More sharing options...
hardwired Posted November 24, 2010 Share Posted November 24, 2010 Sure. You just have to set the repeatRecordNumber to the quantity for each unique coupon in an onRecordStart callback rule. Yes, but don't forget it needs to be randomized. I can do a random generator without a data file as such : myLimit=[1000,250,300,100]; // being maximum repeat count for each coupon for (var i=1;i<=1650;i++) { // loop thru all 1650 coupons do { choice=Round(Math.random()*3, 0); } while (myLimit[choice]===0) ; // pick one of the 4 coupons if (choice==0) { coupon="10.jpg";myLimit[0]=myLimit[0]-1; }; if (choice==1) { coupon="20.jpg";myLimit[1]=myLimit[1]-1; }; if (choice==2) { coupon="25.jpg";myLimit[2]=myLimit[2]-1; }; if (choice==3) { coupon="50.jpg";myLimit[3]=myLimit[3]-1; }; } return coupon; But I do not know how to generate a record each time it goes through the loop... Anyone?? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.