Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ferha_jafri
Partner - Creator III
Partner - 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 III
Specialist III

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 III
Specialist III

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