Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
ferha_jafri
Creator III
Creator III

need to pass getcurrentselections to in of sql

Hello Experts,

Have a req in which I want to have inverted coma and end bracket ,PFA as mentioned in text box.

Thanks in advance

Ferha

1 Solution

Accepted Solutions
jwjackso
Specialist II
Specialist II

This works when 1 year is selected,

 

=If(GetSelectedCount(Year) > 0,GetCurrentSelections(' and ',' in (''')&Chr(39)&Chr(41),'')

 

But if you are selecting multiple years, the Concat  function may be better,

='Year in ( '&Chr(39)&Concat(Year,Chr(39)&','&Chr(39))&Chr(39)&Chr(41)

 

concat.PNG

View solution in original post

1 Reply
jwjackso
Specialist II
Specialist II

This works when 1 year is selected,

 

=If(GetSelectedCount(Year) > 0,GetCurrentSelections(' and ',' in (''')&Chr(39)&Chr(41),'')

 

But if you are selecting multiple years, the Concat  function may be better,

='Year in ( '&Chr(39)&Concat(Year,Chr(39)&','&Chr(39))&Chr(39)&Chr(41)

 

concat.PNG

View solution in original post