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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tContextLoad with a list of id's

Hi, I'm looking to build a list of id's that I can pass into multiple MySQL queries for limiting purposes.  It looks like I can load a list of string values into a tContextLoad, but is there a way to load a list of integers?  Any help is appreciated.

Labels (3)
4 Replies
TRF
Champion II
Champion II

If the purpose is to build an IN clause, just pass the list as a string such as 1,2,3,4 then use it to finalize the query like this:
"select blablabla where id on (" + context.list + ")"

If the purpose is something else, thanks to clarify.
Anonymous
Not applicable
Author

Thanks for the response - I think I'm getting closer.  I'm passing my list to tContextLoad, and it's loading correctly when I print the output.  But when I use that context as part of building a query ... like so -  where Asset.id in (" + context.assetList + ");" ... it looks like the first value in my list gets passed in, but not the entire list.  Is there a way to load in the full context (which is defined as a list of values)?

Aravind_Ravi
Contributor III
Contributor III

Use tDenormalize Component to merge all the line into a single line and that into a context. Then You can use the context in the Where Clause of ant DB queries. 

 

PFA Screenshot for An Example.

 

If this is what you are looking for then, Press the "Accept as Solution " Button. Give A Kudos

Thanks,
AR


Denormalize.png
Anonymous
Not applicable
Author

This worked great, thanks so much!