Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
omarbensalem
Esteemed Contributor

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
MVP
MVP

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

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
Esteemed Contributor

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

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
Esteemed Contributor

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

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
Esteemed Contributor

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

Is my demand clear enough stalwar1‌?..

MVP
MVP

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

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

omarbensalem
Esteemed Contributor

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

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

MVP
MVP

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

You mean you cannot trigger?

omarbensalem
Esteemed Contributor

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

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
Esteemed Contributor

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

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..