What is makerange()

I'm running into an error in an old process model regarding an unrecognized function, "makerange()". A forum search suggests that this function belongs to a shared component, but I'm unable to figure out which component that would be. How can I enable the use of this function?

OriginalPostID-251256

  Discussion posts and replies are publicly visible

  • If there is no result for the function in Shared Components, it could be that as its an old component, it may have been removed due to either compatibility or security concerns.
  • I believe makerange() was replaced be enumerate() a while back. Perhaps refactor the model to use that instead.
  • Thank you for your replies, I'll change the model to use enumerate().
  • enumerate() is not a one to one replacement for makerange().
                                            
    makerange() is documented as follows in Version 6:

                        makerange() This function will generate a list of values for a given range.
                        i.e. makerange(4) = {1,2,3,4} ; makerange(4,55) = {55,55,55,55}

    enumerate() is documented as follows in Version 7:

                        enumerate() Returns a list of integer numbers from 0 through n-1.

    repeat() is documented as follows in Version 7:

                        repeat() Returns a list with the specified number of items.
                        For example, repeat(2,"hello") returns {"hello","hello"}.
                        
    Example Result Sets:

                        makerange(10)                               creates a result set of {1,2,3,4,5,6,7,8,9,10}
                        makerange(10,null)                     creates a result set of { , , , , , , , , , }
                        makerange(10,true())            creates a result set of {1,1,1,1,1,1,1,1,1,1}
                        makerange(10,5)                      creates a result set of {5,5,5,5,5,5,5,5,5,5}
                        
                        enumerate(10)                               creates a result set of {0,1,2,3,4,5,6,7,8,9}
                        enumerate(10) + true()           creates a result set of {1,2,3,4,5,6,7,8,9,10}
                        enumerate(10) + 1                     creates a result set of {1,2,3,4,5,6,7,8,9,10}
                        
                        repeat(5,null)                               creates a result set of { , , , , }
                        repeat(5,true())                      creates a result set of {1,1,1,1,1}
                        
    Since enumerate() and repeat() replace makerange()'s dual functionality you'll need to determine which function meets your needs on a case by case basis.