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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
shalinim1
Contributor III
Contributor III

Context Variable

Hi,

I have used a context variable which has value "1". I'm using that variable as execution id in my job. So I want that context variable value to be increased for every time job runs.

Labels (3)
1 Solution

Accepted Solutions
manodwhb
Champion II
Champion II

@Shalini M​ , you take on subjob ok from main job and take tfixedflow get the context variable and the use tjavrow and increase the value and connect to tDBoutput and insert into that main table.

 

Thanks,

Manohar

View solution in original post

6 Replies
manodwhb
Champion II
Champion II

@Shalini M​ , you need to maintain a table or file, initially you will set the id as 1 ,which you will read and load to context variable and then you will use in your main process that variable once it is compilated successfully then you have to increase that value and insert into that table or a file.

 

Thanks,

Manohar

shalinim1
Contributor III
Contributor III
Author

@Manohar B​, I'm maintain a table for this id. But, I want to know how to increase the count and store it in that table. So that I can use that context variable for my next run.

manodwhb
Champion II
Champion II

@Shalini M​ , you take on subjob ok from main job and take tfixedflow get the context variable and the use tjavrow and increase the value and connect to tDBoutput and insert into that main table.

 

Thanks,

Manohar

shalinim1
Contributor III
Contributor III
Author

@Manohar B​ Thank you. It worked. 😊

Prakhar1
Creator III
Creator III

you can use tPostjob in your job and in tDBOutput write an update query where you are updating the value by first selecting the existing value and then add one on it.

manodwhb
Champion II
Champion II

@Shalini M​ glad to help you.