Is it possible to retrieve the name of the current sub-method running?
I’m building a sub-method library with functions that can be called by methods, but also by sub-methods within itself. I’d like to be able to detect whether or not the function call is external or internal without having to ask the user configuring the step within a method. Does anyone know if this is possible?
E.g.
Example 1 - Method 1 > Sub-method Library A > Function X
Example 2 - Sub-method Library A > Function Y > Function X
Was Function X called by Method 1 or Function Y?
You can retrieve the submethod name using the HSL command GetFunctionName(). You just need to initialize a variable outside of the code to pass it to the method for you to use. See below:
That’s what I thought too, initially, but its not quite what Will needs? GetFunctionName() will return the submethod name, in which case for his example, will always return “Function X”…