Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
bagdwan1
Partner - Contributor
Partner - Contributor

Is it possible to combine cycle with condition

Hello,

I have created a report that uses a condition as well as cycle.

The condition checks if a chart has values.

The cycle field is each recipient.

My intention was that the condition should be tested for each cycle value since not all recipients should receive the report.

Only those who needs to take action should get the report.

But I suspect that the condition is tested before cycle is applied.

Does anyone know if there is a way to combine cycle with condition so the condition is tested for each cycle value?

br

Martin

8 Replies
techvarun
Specialist II
Specialist II

Use  getcurrentfield(cyclegroupname)

bagdwan1
Partner - Contributor
Partner - Contributor
Author

Helllo,

Thank you for you reply.

How do you mean?

In the condition or in the Cycle?

In the condition I can only use a chart or a variable.

In the Cycle I can only choose a field.

So where should I use getcurrentfield()?

br

Martin

techvarun
Specialist II
Specialist II

Is it possible to share a sample app and expected output?

bagdwan1
Partner - Contributor
Partner - Contributor
Author

Example.JPG

Well here is an image that demonstrates the problem.

Adding an example with both QV and NP apps would take to much time.

The script for the app is:

data:

LOAD * Inline [

Person, Sales

1,1000

2,

];

The logic for my condition is to only move forward if the chart has a value.

When no selection in Person is made the chart has a value.

But if we select Person = 2 then the chart has no value.

The problem here is that the condition is applied before the cycle part thus the chart has a value.

If the condition was applied on each value in Person then only person 1 would be true.

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Prakash - I don't get it, how does your suggestion supposed to work with NPrinting?- can you explain?

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Martin,

I had a similar sitiuation and i have created flags in my qlik script to flag records only with values and i used such flag as a filter.

i know it is not ideal solution, but works as temporary workaround for me.

I think in April release these problem can be partialy addressed

regards

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
bagdwan1
Partner - Contributor
Partner - Contributor
Author

Hello,

OK similar to what I'm doing.

I'm going to remove the recipients from the app that should not get the report.

This way I don't need the condition at all.

All recipients that remain should get the report.

Thank you all for your input.

br

Martin

Ruggero_Piccoli
Support
Support

Hi,

No, you cannot use cycles and conditions.

In your case you need to add the filters to the users and the condition as report condition. The condition will be evaluated for each user and only if met the user will receive the report.

Best Regards,

Ruggero

---------------------------------------------

When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.