Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
danosoft
Specialist
Specialist

Concat getFieldSelection

Hi i have this problem, i need to concat a getfieldselection in this set analisys, someone can help me? in this way it show me all month, and not all i selected only:

=if(GetSelectedCount(MESEIN,'','$')>0, '('&Concat(Distinct MESEIN,'|')&')', '('&Concat(Distinct MESEOUT,'|')&')' )

1 Solution

Accepted Solutions
sunny_talwar

May be try this

=if(GetSelectedCount(MESEIN,'','$')>0, '('&Concat({$} Distinct MESEIN,'|')&')', '('&Concat({$} Distinct MESEOUT,'|')&')' )

View solution in original post

15 Replies
sunny_talwar

Is this expression in inherited state or alternate state object?

sunny_talwar

May be try this

=if(GetSelectedCount(MESEIN,'','$')>0, '('&Concat({$} Distinct MESEIN,'|')&')', '('&Concat({$} Distinct MESEOUT,'|')&')' )

danosoft
Specialist
Specialist
Author

wow great...but  i not understand... why with that {$} it work... what it mean?

sunny_talwar

My guess is that the object was in alternate state whereas you were making selection in MESEIN in inherited state... to tell the expression to look in inherited state, we used $

danosoft
Specialist
Specialist
Author

so i want to select GetFieldSelection(<name_field,'','$')

sunny_talwar

Not sure what you mean?

danosoft
Specialist
Specialist
Author

i mean the same did you do with {$}, i want to do the same using the expression in Concat:

GetFieldSelection(MESEIN,'','$'), becouse i see if i use this expression in a text area i see the right value of MESEIN in the default state.

Your expression is correct i didn't know if i put into Concat {$} i can do the same of GetFieldSelection(MESEIN,'','$').

becouse is i use the GetFieldSelection into Concat it is wrong, but if i use the {$} all is correct.

thanks

sunny_talwar

GetFieldSelection is a different kind of function compared to Sum, Concat, Avg, Min, Max.... and specify state in it... you use the third parameter... which you already did

GetFieldSelection(MESEIN,'','$')

danosoft
Specialist
Specialist
Author

sure, but if i put  GetFieldSelection(MESEIN,'','$') into Concat in this way it not work:


=if(GetSelectedCount(MESEIN,'','$')>0, '('&Concat( Distinct GetFieldSelection(MESEIN,'','$'),'|')&')', '('&Concat( Distinct GetFieldSelection(MESEOUT,'','$'),'|')&')' )


but if i use like you did, it work:


=if(GetSelectedCount(MESEIN,'','$')>0, '('&Concat({$} Distinct MESEIN,'|')&')', '('&Concat({$} Distinct MESEOUT,'|')&')' )