copycats Posted November 15, 2019 Share Posted November 15, 2019 (edited) I need to write a script that will return a "group number" for 15 records, then add 1 to the number and return for another 15 records, etc, etc? The specified number is NOT in our data file, so it can't pull from there. ex. ID______ GROUP____ RW10000 1001 RW10001 1001 RW10002 1001 RW10003 1001 RW10004 1001 RW10005 1001 RW10006 1001 RW10007 1001 RW10008 1001 RW10009 1001 RW10010 1001 RW10011 1001 RW10012 1001 RW10013 1001 RW10014 1001 RW10015 1002 RW10016 1002 RW10017 1002 RW10018 1002 RW10019 1002 RW10020 1002 RW10021 1002 RW10022 1002 RW10023 1002 RW10024 1002 RW10025 1002 RW10026 1002 RW10027 1002 RW10028 1002 RW10029 1002 RW10030 1002 I was going to try to add the group number in the data file, but I can't find a way to do that for 12,000 records that isn't extremely tedious and takes forever. Edited November 15, 2019 by copycats Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted November 15, 2019 Share Posted November 15, 2019 Assuming you're setting the Start and End record numbers on the Input tab of the Composition Settings, those are the "IDs", and this should get you the "Groups": var ID = FusionPro.Composition.inputRecordNumber; var Group = Int((ID - 10000) / 15) + 1001; return Group; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.