Jump to content

Page x of y


Deejtko

Recommended Posts

Hello,

 

I am working on a coupon project where each person will receive a different number of coupons based on the input data. To achieve this I am using the following code:

 

FusionPro.Composition.SetBodyPageUsage("5DOLLAR", true);
FusionPro.Composition.repeatRecordCount = Field("Quantity");

To help with sorting I want to show the coupon number:

1 of 65, 2 of 65, 3 of 65, etc...

 

Is this possible since I am using the onrecordstart code above? If so any suggestion on how to achieve this would be appreciated?

Link to comment
Share on other sites

I think you want to do something similar to what Dan helped me with almost 2 years ago. Try this:

FusionPro.Composition.SetBodyPageUsage("5DOLLAR", true);
FusionPro.Composition.repeatRecordCount = Field("Quantity");
var couponNumber = FusionPro.Composition.repeatRecordNumber;
var couponID = FormatNumber("000", couponNumber);
FusionPro.Composition.AddVariable("couponID", couponID);

Then you just need to add the custom variable "couponID" to your template. Note that this custom variable will not show up in your drop down list, but you can manually type it in to the dialog as long as it matches your code.

Link to comment
Share on other sites

Well I think I answered my own question. Using the
«$repeatrecordnumber»

option in the variable text editor window seems to accomplish what I need.

LOL. I've answered several of my own questions by first posting on these forums. I think of the forums like a "shrink" where I just talk aloud, answer my own problems, and then pay him for his services. :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...