I have a requirement where I am creating an iflow to generate csv file based on data received. Example:
One of the fields that I need to populate, called Sequence Number, should be determined based on the dates received..
What this means is, I can have multiple rows of data that have a start date i.e. Row 1: 22 Feb, Row 2: 21 Feb, Row 3: 20 Feb. Now based on these three dates located in different rows, the Segment Number of each row needs to reflect as Row 3: Sequence number = 1, Row 2: Sequence Number = 2, Row 1= Sequence Number = 3.
I have attached an image below of a sample CSV to show what I am trying to accomplish.
If anyone has an idea for the Groovy script to achieve this, it will be greatly appreciated.