Create List off of REPT function

Comments

4 comments

  • Joel Stewart

    Is the REPT string just all one big integer that repeats a pattern 3 times? Does it always repeat exactly 3 times or could it be more or less? 

    0
    Comment actions Permalink
  • Jerry Johnson

    The REPT result will be repeated depending on the factor of how many items were purchased, So it could be more or less. The example I provided was when 3 were purchased.

    0
    Comment actions Permalink
  • Joel Stewart

    Is the product code always 8 digits long? I'm just looking to determine an easy pattern to be able to split the text. 

    One consideration I have is to append a unique character to the end of the product code (i.e. a space character) so the text after the REPT function would be "24307462 24307462 24307642 ". With this output, you could use the TOKENIZELIST function to separate the string into a list based on the space character separators.

    Does this meet your needs? 

    0
    Comment actions Permalink
  • Jerry Johnson

    It turns out I that the EXPLODE_RANGE function provides the results I am looking for. It 

    EXPLODE_RANGE(1;#Quantity).  which replicate records based on Quantity number.

    0
    Comment actions Permalink

Please sign in to leave a comment.