Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Getting the value names from query activity to javascript node

Ramaswami
Level 4
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
Manoj_Kumar_
Correct answer by
Community Advisor
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

 

View solution in original post

1 Reply
Manoj_Kumar_
Correct answer by
Community Advisor
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

 

View solution in original post