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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

output row value in tRest URL

My first REST call returns ID that I need to use in second REST call URL (GET request)0683p000009LrEJ.png

 

I thought in URL I can do something like:

context.host + row2.id

or

context.host + globalMap.get("row2.id");

but I'm getting "row2 cannot be resolved to a variable" error.

 

How do I reference this "id" in tRest and other components?

 

Thanks,

Dima

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Replace tLogRow_3 with tSetGlobVar and capture the id in a variable
Example: your_variable_name=row2.id

Then You can reffer the id in next call using globalMap.get('your_variable_name')

View solution in original post

8 Replies
Anonymous
Not applicable
Author

Hi Dima,

 

Just add a tFlowToIterate immediately before your map, and you'll be able to reference row2.id.

 

Regards,

 

Chris

Anonymous
Not applicable
Author

Thanks, Chris. That helps iterate tRest but I get 'null' for my ID
Anonymous
Not applicable
Author

Can you either use debug or drop a tLog in there to ensure you do actually have data in the field?

Anonymous
Not applicable
Author

It does return the correct ID

0683p000009LrML.png

Anonymous
Not applicable
Author

Can you show the entire job with the tFlowToIterate in place? Thanks.

Anonymous
Not applicable
Author

Replace tLogRow_3 with tSetGlobVar and capture the id in a variable
Example: your_variable_name=row2.id

Then You can reffer the id in next call using globalMap.get('your_variable_name')
Anonymous
Not applicable
Author

That's it! Thanks a lot. I guess I can only reference "row2.id" in tMap but for components like tRest I need to declare a variable

Anonymous
Not applicable
Author

If you want your job to run multiple restGET1+restGET2 then ,
You should propogate the rowX.id to a t FlowToIterate & then to restGeT2, as suggested by @ciw1973