Script Output is not working with Search For Records

Hi!
As you can see in the screenshot, script output is not working with Search For Records. When I put return it stops at execute script. Im trying to get the result of script output and search a record with the output. I tried everything I could think of, but I cant get it to work. Can someone help please.

Hi @buildingwealth

You code can be a lot simpler in that you don’t need return or var var_:

Obviously I can’t see you payload but try it like my example with just this line:

var_toNumber = webhook_payload_parsed.To.replace(/\D+/g, '').slice(-10).trim();

and see if it works.

1 Like

@Jason Thanks :slightly_smiling_face: I was able to get it to work when I switched to a calculation like so. I couldnt get it to work with execute script. I even tried to wrap it with String(). The Calculation does the trick though. Thanks :slightly_smiling_face: