Skip to Content
0
Dec 08, 2022 at 11:25 PM

Is not a function error

134 Views Last edit Dec 08, 2022 at 11:33 PM 2 rev

Hi,

I've been facing an issue for quite a long time now, which I've always managed to bypass so far but it has become so critical it really blocks my project now. Let me explain:

I created a custom script containing a regular expression, the activity (#29) works well and generates a proper output (a 2 or 3 digit number):

image.png

image.png

However, each time I add another custom script right after an existing custom script (selecting the previous custom script output as input: what I'm trying to do here is to "clean" the previous custom script output in case it contains unwanted characters) and I run the automation, the second custom script results in the following error message "input.match is not a function" (note that both custom script activities have the same kind of function: return input.match(MyRegex);):

image.png

image.png

In the above screenshots, the first custom script is part of a Try/Catch Control, but even when not using a Try/Catch control, the second custom script always results in the same kind of error message "input.match is a not a function", whereas both regex work fine and each custom script performs well when "standing alone".

What am I missing here? Does anyone have a clue?

Thanks for your help.

Best regards,

LM.

Attachments

image.png (56.9 kB)
image.png (97.5 kB)
image.png (91.6 kB)
image.png (95.6 kB)
image.png (98.3 kB)
image.png (93.3 kB)
image.png (90.1 kB)
image.png (97.1 kB)