I'm trying to make a user-sensitive query, so each user can see only some data.
I've added this code on the dsataset query as groovy script:
if ("""PIPPO""".equals(attributes.get('pippo')) ){
query=query + ' WHERE pippo ='+ attributes.get('pippo');
}
else {
query=query + "-- AAA" + attributes.get('pippo');
}
In query log I get this:
<my_query> -- AAAnull
so I assume pippo attribute is not correctly passed to the script because I defined it as a user attirbute and I gave it the value PIPPO