Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hi everyone, can someone please explain me the below expression:

Hi everyone,

can someone please explain me the below expression..

=IF(GetSelectedCount(Market)=0, SubField(Concat(DISTINCT Market, ','),','), subfield(GetFieldSelections(Market),',' ))

8 Replies
MK_QSL
MVP
MVP

Consider that you have below in your script..

Load * Inline

[

  Market

  A

  B

  C

  D

  E

  F

];

=IF(GetSelectedCount(Market)=0, SubField(Concat(DISTINCT Market, ','),','), subfield(GetFieldSelections(Market),',' ))


Here if condition is checking whether user has selected any value from Market list box...



if not selected...

SubField(Concat(DISTINCT Market, ','),',')

     Concat(DISTINCT Market, ',') will concatenate all market and

     SubField(Concat(DISTINCT Market, ','),',') will give you First Market i.e. 'A'


If Selected

subfield(GetFieldSelections(Market),',' ) will give you First Market from User Selection...


If you still having confusion understanding this code, please refer QlikView Reference Manual and try to understand

if, Concat and Subfield funcitons...

    


Not applicable
Author

hi shitej how is mahindra  and mahindra

Not applicable
Author

If there is something selected in Market field, it will get the 1st value in the list of selected Market values, else It will get the 1st value in all Market Values. in fact, this expression will always returning the same information no matter there is a selection or not.......

Not applicable
Author

Hi, thanks for the explanation

I have a question following..

how is,

1. Checking the Always One Selected Value in the properties of the Market text box field here and,

2. writing a trigger expp.

=IF(GetSelectedCount(Market)=0, SubField(Concat(DISTINCT Market, ','),','), subfield(GetFieldSelections(Market),',') )

different from each other..? how do they effect the remaining items in the sheet..?

Not applicable
Author

Hi, thanks for the explanation

I have a question following..

how is,

1. Checking the Always One Selected Value in the properties of the Market text box field here and,

2. writing a trigger expp.

=IF(GetSelectedCount(Market)=0, SubField(Concat(DISTINCT Market, ','),','), subfield(GetFieldSelections(Market),',') )

different from each other..? how do they effect the remaining items in the sheet..?


Not applicable
Author

it means conditions is always false then what is need to write that condition

ychaitanya
Creator III
Creator III

Nice Explanation..!

Josh_Good
Employee
Employee

Sounds like you are using QlikView and not Qlik Sense.  Is that correct?