Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

passing value to trest

hi ,

 

I have an issue in my job.

I have loaded some reports from an API using tRest component.

while I am extracting that API ,I am getting some data like id,name and key column and value below it.

so I have done the job like tRest component(POST method) --> tExtractJSONFields ----> finally loaded it to tfileoutputexcel

so in this I am getting ouput like

id,name,key

1,janu,Mnv674=

 

so the key which I got will be expired in every 8 hours.

so I want the key to be parsed to another trestcomponent (POST method) automatically.

I have done the job like

tREST component (POST method)  -->  tExtractJSONFields  ----> tfileoutputexcel --------------------- (on component ok) ------> tREST component -------> tExtractJSONFields ------------> tfileoutputjson

in the 2nd tREST component I will pass the key we are getting from the excel output into the http headers. 

 

I want the key to be automatically loaded to the second job.

 

could anyone of you please help in this.

 

regards,

harshi

 

 

 

 

Labels (5)
16 Replies
Anonymous
Not applicable
Author

Please send a screenshot of Job and settings, and show us what element cause you trouble. 
I don't understand where is the problem exactly, i need a visual explication.

Anonymous
Not applicable
Author

sir,

my job is
tREST---------->tExtractJSONFields----------->tJavaRow------------->on component ok----------->tREST------------->tExtractJSONFields-------------->tfileoutputjson

so I have applied your logic in tJavaRow.
now this I have to pass this variable to second tREST component in http header value.
please look into this and give the solution
Anonymous
Not applicable
Author

What did you write in your tJavaRow ?

Anonymous
Not applicable
Author

sorry ,
not tJavaRow.
In tJavaflex,
globalMap.put("token", row2.token);

this I have written.
from this tJavaflex I have connected to tREST.
I want this value to be in http header value in tREST
Anonymous
Not applicable
Author

in your http header value, you have to write : (String)globalMap.get("token")

If it doens't work as expected, show us the error message.

 

Anonymous
Not applicable
Author

No sir. Its not working...
Anonymous
Not applicable
Author

hi sgv,

thank you for your help.
I have passed globalMap.put("token", row2.token); in tJavaflex
---->main--->tFlowToIterate --> iterate--->tREST
In tREST I have written ((String)globalMap.get("row3.token")) in http header value (where I want this value I have posted)

regards,
harsitha