How to convert SET to DATASET in HPCC / ECL?

I have this SET in ECL EXPORT TableNames := [ 'tbl1', 'tbl2', 'tbl3', 'tbl4' ];APPLY(TableNames, SomeFunctionPreviouslydefined);... and I want to pass it to a function using APPLY.APPLY does not accept SETs: "3002: syntax error near \"tblList\" : expected RANGE, ROWSET, SELF, SUCCESS, datarow, dataset, dictionary, module-name, identifier, identifier, function-name, identifier, macro-name, '+', '^', '(', '['"How can I do it?...Read more

hpcc - What is the ECL equivalent of NaN or IsNumeric?

I want to check if some value (i.e: 42 or 41.0005) is a number in ECL (HPCC).I have in mind a function using Regular Expressions like this:EXPORT IsNumeric(STRING UniqueID) := FUNCTION regex:='^\\d+$'; RETURN REGEXFIND(regex, UniqueID); END;Is there a built-in IsNumeric function?If not... Is there any better way of doing it than using regex? (Thinking both in readability and performance)Maybe an ECL command?STD function?Casting?#GetDataType? str.filter?NOTE: Seems that in old versions of HPCC (2011) such function did not...Read more

hpcc - Controlling ECL loop macro using results of a query

We are trying to write a loop macro with a break function. Basically we would like to repeat a certain action until X (derived from a Dataset) is true. The compiler doesn't seem to like this approach however (returns 'Constant expression expected') so we were wondering if there is a known workaround? An entirely artificial example is provided below, called by:LoopFunction(5); from a BWR window.EXPORT LoopFunction(NMax = 5) := MACRO Rec := RECORD INTEGER i; END; #DECLARE(i); OUTPUT(DATASET([1], REC), ,'~TEMP::MB::LOOPTEST' + %i%, COMPR...Read more

HPCC-ECL Logical Operators - Why is OR not short-circuiting?

The documentation indicates that the OR logical operator should short-circuit: If the probability of occurrence is known, you should order them from the most likely to occur to the least likely to occur, because once any part of a compound OR condition evaluates to TRUE, the remainder of the expression is bypassedUnless I am mistaken, this is not behaving as expected. When it has to evaluate an expression that returns TRUE, it seems to continue to evaluate the next expression after the OR.It seems that for a hard-coded value of TRUE, it work...Read more