Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
satishqlik
Creator II
Creator II

pls help

Hi All,

I've 2 list boxes in the attached app.

requirement is I need to restrict the Value(3) in listbox for Country(AUS).

I've tried with below exp

If(GetfieldSelections(Country)='AUS','3',Value)

It seems fine but if I select Value(3) its not giving as I expected.

where I did wrong in my expression??

can some one help me out in this.

8 Replies
YoussefBelloum
Champion
Champion

Hi,

what do you mean by: if I select 3 its not giving as I expected. ??

can you explain what is missing?

satishqlik
Creator II
Creator II
Author

It seems find when I used above expression in the Value listbox

Capt1.JPG

But problem with after selections (If I select Value 3 for Country AUS) below snapshot for your reference.

Capt2.JPG

Thanks,

vishsaggi
Champion III
Champion III

May be you want to write same expr for your Country list box like

If(GetfieldSelections(Value) = 3, 'AUS',Country)

satishqlik
Creator II
Creator II
Author

Hi Nagaraju,

Thanks for the response.

I've tried with same in Country list box as well.But still no luck.

I've been facing same problem even if implemented in Country list box.

Can you suggest how to overcome in this??

vishsaggi
Champion III
Champion III

What is the issue you are facing. For me when i select AUS the value shows 3. Then i clear the selections then selected 3 then AUS showed up in Country. Check below:

Capture.PNG

Capture1.PNG

If this is not what you looking for please elaborate your expected output.

satishqlik
Creator II
Creator II
Author

Apologies for the delay.

You wrote-

"What is the issue you are facing. For me when i select AUS the value shows 3. Then i clear the selections

then selected 3 then AUS showed up in Country."


Here don't clear the selections.


do the below steps:

Select Country AUS in list box.

Now we will be able to see only 3 in other list box(Value)

and select 3 in Value listbox(don't clear the selections)


and see the results as I showed the results in above screenshots.


Also  I've tried  along with Pick and Match in Value list box in below.


my desired output should be in the below snapshot, it should show only 3 in Value list box.  


op1.JPG


and after immediate selections in Value list box 3 then it should show(Greyout) corresponding Countries as shown in below.

op2.JPG


=If(GetFieldSelections(Country)='AUS',Pick(Match(Value,'3'),Value),Value)


implemented same in other list box(Country)  But still no luck.


=If(GetFieldSelections(Value)='3',Pick(Match(Country,'BRZ'),Country),Country)


Please correct me if anything wrong.



Frank_Hartmann
Master II
Master II

not sure if this meets your requirement but give it a try.

go to settings --> Document Properties --> Triggers

then go to:

"Field Event Triggers" select Coutry and choose "On Select"  -->Add Actions --> Add --> Selection -->Clear Field  --> Value

then do the same with Value Field:

"Field Event Triggers" select Value and choose "On Select"  -->Add Actions --> Add --> Selection -->Clear Field  --> Coutry

satishqlik
Creator II
Creator II
Author

Other than triggers, do we have any alternates to accomplish this because same I need to implement in Qliksense.

Kindly suggest on this