Return Results from custom javascript pipe

Is there any documentation or detail available on returning a response from the custom javascript pipe? It looks normal in the test window, but once I call it from the action button I’m getting an empty response.

Just to follow on from this message.
It seems that the Custom Javascript pipe is always returning 3 values, “status”, “result”, “expression”
And it also seems that status will always return “success”

How do I create additional response parameters and assign them in the server side JS, to be returned in the pipe response?
And how do I change the status to return something else other than “success”, if there is an error.

Thanks a lot.

“result” will be the return from your custom Javascript.You don’t use the statement “Return” but simply end your script with the value / variable to want to return as the response. This can be a concatenation of text and your variables.

Tadabase @moe @tim.young , is this still the case, can a pipe’s custom Javascript only return a single response? (albeit that you can concatenate and split-up outside the call?)

We have a more powerful Javascript Pipe called “Serverside JS” which is more highly customizable and powerful, feel free to check that out and in that one you can tweak the response to return a few results or whatever else you want. @GREDDIE

1 Like

Perfect thanks @moe I didn’t realise that existed ! :slight_smile: it’s just what I needed :+1:

I’ve got various equations and formulas firing off and they’re reiterating due to referencing each other so in n attempt to speed up the process I’m removing the formulas and going to replace with a single pipe call hopefully… many thanks for this post this is exactly what I need … (I think) :wink:

update —

When I install that pipe and attempt to either copy or edit it I receive an error …

erroroccurred

it allows me to add other new different pipes (such as the excel spreadsheet) and create new calls so it seems specific to this pipe and it doesn;t appear to be a threshold of pipes Ive reached.

Can you look at the Network Panel when you save it, are you getting a 500 error code or 403? Are you famiiliar with how to do that?

I see the issue. Our firewall is blocking it since it looks like malicious code. @GREDDIE I will email you and coordinate a way to help you get this set up.

1 Like

@moe yep that worked thank you so much

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.