Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
surajap123
Creator II
Creator II

select a specific field value with action only if no value is selected

Hi Experts,

I want to select value2 in a field using Action(in a button) only if the user has not selected any value(before coming to see this report). The report is in a separate sheet, so the user will be coming to this sheet by clicking a button. 

Load * INLINE [
Field
value1
value2
value3
];

Below expression not working

if(GetSelectedCount(Field) = 0, 'value2',Field)

Thanks!

Labels (1)
2 Replies
martinpohl
Partner - Master
Partner - Master

use this:

=if(GetSelectedCount(Field)=0,value2,'('&concat(distinct Field,'|')&')')

Regards

MayilVahanan

Hi @surajap123 

IF 2 values are selected, then ur expression won't work. Try like below

MayilVahanan_0-1608114484156.png

 

=if(GetSelectedCount(Field) = 0, 'value2', '('&concat(Field,'|')&')')

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.