Changing a Field Array

Hello Everybody,

I have a field which contains a text array. A typical record might have the following entry:

99; 8.3
106; 12.7
62; 5.2

Each record will have a different array, and there may be more or fewer elements. But there is always at least one element.

What I need to do is to remove all elements in which the last number is greater than 12. In the example above, that record will have the second element eliminated. I plan to ARRAYSTRIP when done so there are no empty elements in any record.

I tried the following:

FormulaFill ARRAYFILTER(«myField», ¶, ?(val(array(import(),2,";")) > 12,
    "", import())

The syntax of this line is OK, but when the macro runs I get the error message:

Runtime error on call( procedure

Is there an expert who can advise me what’s going on? How can I accomplish what I want to do?

Regards,
Vic

The arrayfilter( function requires the formula to be inside quotes and you are missing a final closing parenthesis for the function:

FormulaFill ARRAYFILTER(«myField», ¶, {?(val(array(import(),2,";")) > 12,
"", import())})

Thanks, Gary. That worked. I didn’t remember the formula had to be quoted.

There was a typo in my post - I actually did have the proper number of parentheses in the code.