cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

JS Connector workato

Patel0786
Deputy Chef III
Deputy Chef III

Hi guys, i want help today i created one recipe using JS snippet by workato in this recipe i get the data from Salesforce and by using JS connector i did the Data Transformation , in this JS connector i defined the schema for input and output field but whenver i am trying to create a list by using variable by workato and maapind the datapill i'm getting empty array  no value is coming , i don't know how to provide the value to output field which one is defined in output schema.

 

Recipe:- 

https://app.workato.com/recipes/55094891?st=5c76842f9eafa8531a47464d5bba861e4f48a39940aab5eeae13079c... 

js code block :- JS code BlockJS code Block

output from js snippet - output from JS Snippetoutput from JS Snippet  this is output & input Schema for JS Snippet :- 

output schemaoutput schemainput schemainput schema

creating List and mapping data but not getting any  value :-

list creationlist creation

output getting emptyoutput getting empty

i'm trying to map with output schema but not getting any value.

2 ACCEPTED SOLUTIONS

gary1
Star Chef I
Star Chef I

On the JS connector output schema the output is named "output", but in your code the output is named "updatedInput". They need to match.

View solution in original post

@Patel0786 Is there any reason for not directly using formulas when mapping your Salesforce search results into a list, even if the JS code is working properly? We usually recommend using code (via JS, Ruby, or Python connectors) as a last resort to implement specific solutions that can't be covered using a Low-Code/No-Code approach, or when code can be significantly more efficient in terms of tasks or execution time. Apparently, neither of these situations applies to your use case. A Low-Code/No-Code approach speeds up development and facilitates the subsequent maintenance of recipes. That's why we always say this should be the ideal approach when possible.

View solution in original post

2 REPLIES 2

gary1
Star Chef I
Star Chef I

On the JS connector output schema the output is named "output", but in your code the output is named "updatedInput". They need to match.

@Patel0786 Is there any reason for not directly using formulas when mapping your Salesforce search results into a list, even if the JS code is working properly? We usually recommend using code (via JS, Ruby, or Python connectors) as a last resort to implement specific solutions that can't be covered using a Low-Code/No-Code approach, or when code can be significantly more efficient in terms of tasks or execution time. Apparently, neither of these situations applies to your use case. A Low-Code/No-Code approach speeds up development and facilitates the subsequent maintenance of recipes. That's why we always say this should be the ideal approach when possible.