Reino Posted August 22, 2012 Share Posted August 22, 2012 I would like to be able to compare a field value in one record in my data source to see if it equals the value of that field in the next record in my data source. I would like to continue this comparison till the field value changes. The goal is to extract into each PDF letter all the rows that have the same field value in column one. So...instead of variable information coming from one record, I want to combine variable information from multiple rows (records) where a specific field value is the same. Has anyone done this? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted August 22, 2012 Share Posted August 22, 2012 This is easy in FusionPro 8: if (FieldChanged("Your Field Name)) FusionPro.Composition.OpenNewOutputFile(); Quote Link to comment Share on other sites More sharing options...
Reino Posted August 22, 2012 Author Share Posted August 22, 2012 Is there any hope of doing this is we are still using version 4.2? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted August 22, 2012 Share Posted August 22, 2012 Is there any hope of doing this is we are still using version 4.2? No. Well, at least not if you're really trying to output to multiple files. The ability to open a new output file at any given time ("arbitrary chunking") is new in FusionPro 8.0. In earlier versions, you could chunk the output to multiple files, but all the chunks (other than the first and last) had to be the same size (same number of records). The only way to do what I think you're trying to do in those older versions is to break up the input file and do multiple compositions. However, if what you're trying to do is aggregate all the records from the data into a single output record, you can do that by opening the data file with ExternalDataFileEx, then you can iterate through it and do pretty much whatever you want. This should work even in older versions. At any rate, you should really consider upgrading. FusionPro 4.2 is five years old. It predates the very first iPhone. Quote Link to comment Share on other sites More sharing options...
ehigginbotham Posted October 22, 2012 Share Posted October 22, 2012 Can the same idea be used to turn on an unused body page when a field changes? if (FieldChanged(Field("fieldname"))) FusionPro.Composition.SetBodyPageUsage("test",true); Its not working for me, but I just thought it might be useful if it could. thanks Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted October 22, 2012 Share Posted October 22, 2012 Can the same idea be used to turn on an unused body page when a field changes? if (FieldChanged(Field("fieldname"))) FusionPro.Composition.SetBodyPageUsage("test", true); Its not working for me, but I just thought it might be useful if it could. Yes, that idea should work in general. But your first line is wrong; you don't want to call the Field function inside the FieldChanged() call. I highlighted the parts you need to remove above in Red. So the rule should look like this: if (FieldChanged("fieldname")) FusionPro.Composition.SetBodyPageUsage("test",true); Or, more simply, like this: FusionPro.Composition.SetBodyPageUsage("test", FieldChanged("fieldname")); Quote Link to comment Share on other sites More sharing options...
ehigginbotham Posted October 22, 2012 Share Posted October 22, 2012 that worked great. thanks 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.