Expand my Community achievements bar.

SOLVED

Getting the value names from query activity to javascript node

Avatar

Level 4

Hi Team, 

 

i have a query activity and i need to get the values of query into javascript variables. 

 

Ramaswami_0-1591351788524.png

 

This is my workflow : 

 

Ramaswami_1-1591351828715.png

i need to get the event date values that is 1st may and 32st may to javascrpt variables like 

 

vars.fromDate = vars.Getfromquery

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @Ramaswami ,

For this use case, Instead of directly hardcoding the date in query activity you can use a javascript activity in the start to initialize the variables.

Like This:

manojk62306941_0-1591354658152.png

 

Then you can call these variables in the query activity like this:

manojk62306941_1-1591354694691.png

 

 

and then finally call the same variable in the second javascript activity to get the values like this:

manojk62306941_2-1591354760924.png

 

 

And this is how the complete workflow will look like:

manojk62306941_3-1591354813684.png

 

 

Let me know if that helps

 


     Manoj
     Find me on LinkedIn

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hello @Ramaswami ,

For this use case, Instead of directly hardcoding the date in query activity you can use a javascript activity in the start to initialize the variables.

Like This:

manojk62306941_0-1591354658152.png

 

Then you can call these variables in the query activity like this:

manojk62306941_1-1591354694691.png

 

 

and then finally call the same variable in the second javascript activity to get the values like this:

manojk62306941_2-1591354760924.png

 

 

And this is how the complete workflow will look like:

manojk62306941_3-1591354813684.png

 

 

Let me know if that helps

 


     Manoj
     Find me on LinkedIn