jcaloway Posted November 23, 2016 Share Posted November 23, 2016 My data file has a field that has two parts I only want to create a new output file when the first part of the data changes. See the sample data below. Can I use an array to only create a new output file when T1 changes to T2 or do I need to split my data into two fields before using it into FusionPro? Sample data looks like (Sack and Pa is one data field currently) Sack and Pa T1 P1 T1 P1 T1 P2 T1 P2 T2 P1 T2 P1 T2 P2 ... ... Thanks in advance for any help you can provide Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted November 23, 2016 Share Posted November 23, 2016 Sure, you can do something like this in OnRecordStart: var thisFieldPart = Field("Sack and Pa").split(/\s+/)[0]; var previousFieldPart = FusionPro.PreviousRecordFields["Sack and Pa"].split(/\s+/)[0]; if (thisFieldPart != previousFieldPart) FusionPro.Composition.OpenNewOutputFile(thisFieldPart + "." + FusionPro.Composition.outputFormatExtension); Quote Link to comment Share on other sites More sharing options...
jcaloway Posted November 27, 2016 Author Share Posted November 27, 2016 Thanks for quick response and help 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.