Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Not able to Reset the variable if i declared constraint?

Hello,

I've a input box with values ALL;1;50;500;1000; and constraint as

=if(len(GetFieldSelections(A))>0,

if($(vCarriers)='ALL','',$<= (count(distinct B))),

if($(vCarriers)='ALL','',$<= (count(distinct B))))

- The logic what i want to perform is:

1. By default my variable value will be ALL.

2. When i select ALL in the input box it should not show any error message box.It should show the error message only if the value is more than the count of B

3. When i made any selection for A. By default the variable will be ALL only it is fine. But if change the value and again if select ALL it should not show any error message. It should show the error message only if the value is more than the count of B.

Now in a button i want to reset the variable to vCarriers as ALL when i click on it. But i'm not able to reset it with above query

Working query:

=if(len(GetFieldSelections(A))>0,

$<= (count(distinct B)),

'')

- With above query i can able to reset the variable to ALL when i click on the button. But the above query is not working fully.

For eg:

1. When i select any value in the inputbox and if the value is more than the count of B. it not shows the error message.


2. Afer my selection for A i'll select the values in the input box then it shows the error message when the value is more than the count of B. But once the value is changed and if i'm trying to select ALL it is shows the error message.

Can any one help me on this.


0 Replies