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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
sbxr
Contributor III
Contributor III

Assign Value to context in tjava based on If else condition

hi ,

FYI @TRF @xdshi @shong 

I want to assign values to the context based on if else condition in Tjava,please reffer the image attached.

 

If 

context.counts==0;

then

context.status=="Pass"

else:

context.counts!=0;

context.status=="Fail"

Please help me with this,

 

Thanks,

 

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

try this code:
if(context.counts==0){
context.status="Pass";
}else{
context.status="Fail";
}

Regards
Shong

View solution in original post

2 Replies
Anonymous
Not applicable

try this code:
if(context.counts==0){
context.status="Pass";
}else{
context.status="Fail";
}

Regards
Shong
sbxr
Contributor III
Contributor III
Author

one more help please,

how can i assign value of each itteration into a different context.

context.test=((String)globalMap.get("row5.ValidationQuery1"));
System.out.println(context.test);

But it is printing all values in same field,
i want to store each itteration result in different context.
Thanks