Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
canoebi99
Partner - Creator
Partner - Creator

Report to loop through Sales People that have Sales in the selected period (and ignore those that don't).

Hi all, 

I am trying to create a report using the application automation to be emailed to all the Sales People that have sales in a given month. 

I have tried to do this by creating a report, then adding the sheets required and then adding a selection to the report for the current year and month (using the get variable block to collect the current year and month from the app). 

The challenge I am having is how to only loop through the Sales People that have sales for that period. 

If I use the "List values of Field" block or the Get Straight table block these both seem to ignore the selections I have placed on the report so I can only get a list of all the Sales People rather than just those with Sales for the period selected. 

Am I right in thinking that the add selection to report does not affect those blocks? If so is there a way to return a list of only the sales people with sales in the current year and month so that I can then use that list to loop through and select each sales person for sending out the emails? Essentially I want to return a list of the possible values from the Sales Person field once the year and month selections are in place?

Thanks in advance. 

 

Labels (3)
6 Replies
canoebi99
Partner - Creator
Partner - Creator
Author

Update: I managed to acheive this by adding a straight table into the app that had the required filtering (sales year and month) and Sales Person name so that I could use that and the get straight table block for my list. 

I suspect there is a better way so I would still appreciate further comments because I don't really want to clutter the app up with straight tables which I will have to doing things this way. 

MBardy
Contributor
Contributor

i all,

I am facing the same problem, how can we use "List values of field" based on previous selection in the report.

For the moment, "List values of field" output all possible value for a field, no matter if a selection was made before.

Example  : 

i want to generate a report with a first page "Region" and loop after on town of this region.

Even if i set a selection to the report on the "Region" field, "List value of field" on Town field will ouput all possible Town in the app.

Thank's

Ramina
Contributor II
Contributor II

Having the same problem

lvdbrink
Partner Ambassador
Partner Ambassador

If you make sure to create a master item for the dimension you want to list the filtered values for, you can use the "List Dimension Values" block after applying a selection using the "Select Field Values By Query" block.

 

lvdbrink_0-1720621506011.png

 

Ramina
Contributor II
Contributor II

it doesn't make sense, what you wrote. I don#t want to put a hard selection on a field or dimension, but to loop through different values that are possible and not through all values.

lvdbrink
Partner Ambassador
Partner Ambassador

That is exactly what my proposed solution does, from the post I was responding to:

"i want to generate a report with a first page "Region" and loop after on town of this region.

Even if i set a selection to the report on the "Region" field, "List value of field" on Town field will output all possible Town in the app."

You can achieve this by applying a selection for "Region" to your dataset by using the "Select field values by query" block and then use the "List dimension values" block on the Master item that holds the "Town" dimension.

The "List values of field" block will not respect an applied selection, the "List dimension values" block will.