Why does the top workflow succeed with an OOTB node, while the bottom one tells me that my defined function ‘isequalto1()’ is not found?
I guess it makes sense, because according to my function definition, I have to feed it 1 argument so that it works. But then how does the OOTB node work? Does it have some kind of conditional clause to return the function itself if no arguments (or not enough of them) are supplied? Is there anyway to achieve the same in designscript?
(Ignore the top warning, it’s because of multiple definitions of List)
there is no version of your function that takes no arguments - just use the name of your function without the () - that invokes it and returns the result - but you don’t have a version of that function which has no parameters - so thats the error.
get rid of the () - where you try to pass your function as a functionObject.
you can do this with a hidden function - __CreateFunctionObject - which converts a function pointer to a Function object- see the implementation in DS here: