How to generate comma separated numbers between first and second number?

I want to ask is there any approach that we can use in Data Transform, to view list of comma separated numbers on input of start and end number.

E.g start number =15, end number =21

List of number=15,16,17,18,19,20

Is there any approach that I can use??

Hi @SiddharthKumarGupta: 2 ways i could think about.

Option 1: In the Data transform follow the below steps.

  1. Set the start index and end index based on the value you enter in UI to a property or param and call another DT (DT2) which does the below steps
    1. When Start index < End Index
      1. String value = String value + “,”+ Start Index (creating the string which you need)
      2. Start index = Start index + 1 (Incrementing the index for next loop)
      3. Set the Data transform name (DT2) in a parameter
      4. Call the data transform using the parameter set in above step

Caution: Misconfiguration will leads to infinite loop. So be cautious. Do all validations (like end index should be greater than start index) before you run the DT.

Option 2: Execute a activity which can use for loop to generate the sequence.

Thanks.

@ArulDevan

Thankyou Arul for the hint, I tried the approach ,

Checked condition in DT1 FirstNo<SecondNo and called DT2.Written logic in DT2 and called the same DT2 again.

It’s working fine.

Thankyou for hint.