Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
OmarBenSalem

If an alert is 'validated', eliminate this alert (value) from the listBox

Hi everybody stalwar1‌,

The question is not clear, I'll try to explain what I want to do :

I have a field called alerte

Each time I can only select an alerte

Now there is a button called : validate

What I want is : when I click on an alert and validate it, I can't see no more, it disappear from the list box alerte

12 Replies
sunny_talwar

May be like this for your list box expression

Aggr(Only({1<alerte -= {'$(Variable)'}>} alerte), alerte)

where the Variable gets the value of alerte from the list box and save it into the variable

OmarBenSalem
Author

I thought about sthing like this :

I've created a variable called vValidate and initiated it at 0

If I click on the Validate button, vValidate transforms to 1.

I've created another variable called : vAlertValidation= getfieldselesctions(alerte)&vValidate

With that variable I want to know if the variable has been validated or not

so what I did is :
the list box is not alerte anymore but:
if(getfieldselections(alerte)&0=vAlertValidation,alerte, null())

Obviously this did not do the trick, because, when I select an alert, Qlik will only take into consideration the selected value

Capture.PNG

and once the selected alert is validated, the list box won't show any alert because, I've already selected one alert.. (I don't know if the reason is made clear enough... it's all about qlik's associativity )

Capture.PNG

help please

OmarBenSalem
Author

based on your answer,

I added variable : selectedAlert= getfieldselections(alerte)

and changed my expression as ;

=if(GetFieldSelections(alerte)&0=$(AlertValidation),Aggr(Only({1<alerte -= {'$(selectedAlert)'}>} alerte), alerte),null())

byt still the same result..

OmarBenSalem
Author

Is my demand clear enough stalwar1‌?..

sunny_talwar

You will have to somehow trigger its value into the variable... expression is not what you would want to use here....

OmarBenSalem
Author

If you have any other way to do I'd be pleased to here it !

sunny_talwar

You mean you cannot trigger?

OmarBenSalem
Author

I can trigger variables, it's the logic behind how to do this that I can't figure out,

for example, when you tell me,

Aggr(Only({1<alerte -= {'$(Variable)'}>} alerte), alerte)

where the Variable gets the value of alerte from the list box and save it into the variable

Variable is getfieldselections(alerte) or just=alerte?

OmarBenSalem
Author

If it's alerte and I select alerte=InputVariable, here is what I have :

Capture.PNG

Same thing when It's the other way (getfieldselections(alerte)

so my selected alerte apperas and the others are dark shaded..