Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
danosoft
Specialist
Specialist

Select multiple values in a field action

Hi i want to select multiple values in a field from my Button, i try to explain:

i have those button:

When i click 01 it will select the value 01 from my field "mesefineforn"

"Mese01" is my variable for select and deselect my value in the field "mesefineforn"

My problem is:  When i click in '02' i want in my field "mesefineforn" it will set 01,02

not only 02.

when i will click in 03 the same it must be set : 01,02,03    and so on...

how can i do that with my buttons actions?

Thanks

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Daniele - Sorry, I was travelling so sorry for the delay. Have a look at the attached file.

View solution in original post

16 Replies
tamilarasu
Champion
Champion

Hi Daniele,

You can try search string like (01|02|03) for multiple value search.


Capture.PNG

danosoft
Specialist
Specialist
Author

ok but i need to put at runtime clicking to my buttons those values to set..... like you see in example, how can i do that?

tamilarasu
Champion
Champion

Daniele Caprelli wrote:

i want to select multiple values in a field from my Button, i try to explain:

i have those button:

You have to hard code those values in each button action.

Button 01 => 01

Button 02 => (01|02)

Button 03 => (01|02|03)

and so on.

tamilarasu
Champion
Champion

Daniele Caprelli wrote:

ok but i need to put at runtime clicking to my buttons those values to set..... like you see in example, how can i do that?

I think both the questions looks similar.

'Ctrl' click by actions in Text boxes on same field

danosoft
Specialist
Specialist
Author

I think my question is little bit different

my problem is:

in my Button 01: when i choose it i need to do the thing like you see in the picture i sent before, and i write there:

field: MESEFINEFORN  set =if($(MESE01)=1,null,01)

when i click in Button 02 (or 03...12)  i need to set in field MESEFINEFORN :  if($(MESE02)=1,null,02)

i need in these scripts put something for concatenate the values if i had set value in field with another of others 12 buttons

example:  =if($(MESE01)=1,null,<THERE I NEED TO PUT THE EXPRESSION FOR CONCATENATE POSSIBLE VALUES IF I HAD CLICK IN OTHERS BUTTONS BEFORE>)

sorry if i wrote in uppercase, is only for show you where i don't know what i need to write

Thanks

tamilarasu
Champion
Champion

If I understood you below one should work.

Button1:

=if($(MESE01)=1,Null(), '(' & GetFieldSelections(MESEFINEFORN, '|') & '|01)'


Button2:


=if($(MESE01)=1,Null(), '(' & GetFieldSelections(MESEFINEFORN, '|') & '|02)'

danosoft
Specialist
Specialist
Author

Yes, you understood, but it not work 😞

=if($(MESE01)=1,Null(), '(' & GetFieldSelections(MESEFINEFORN) & '|' & '01)'

'01' is a string to set.... perhaps is that the error in condition?

and... i think... looking the script if i choose this button for first (all buttons can be choose for first) ... it will set |01 so... i think it will not set the correct walue

btw... this script not work

sorry

tamilarasu
Champion
Champion

Daniele - Sorry, I was travelling so sorry for the delay. Have a look at the attached file.

danosoft
Specialist
Specialist
Author

Thanks, is ok....

but only a thing is missing, when i Click for example in  BU 01 the second time it must REMOVE the value from the field