Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Coming across a problem with how current selections represents a field due to using a select in field statement that's aiming to select multiple values. When you push the selection, the field itself selects all the correct values, but instead of GetCurrentSelections returning a number of values, it returns the exact string that's been passed to it, and therefore isn't bound by the max values constraint.
(FYI: I'm currently using Qlikview 11.2 SR7 for various reasons!)
As an example, we use a button that has a select in field trigger attached to it to pick out multiple values of a particular field, say the field is ProductCode and the select in field search string is: (A100|A101|B102|B103|C104|C105|D106)
On applying, the field ProductCode will correctly select those 7 values, but when using a current selections box or using the function GetCurrentSelections, even with max values set to lower than the default 6, it will return the exact string for ProductCode. What I want it to do is use the default behaviour of saying "7 of X" selected.
I can create a custom string by using the GetSelectedCount and GetFieldSelections functions along with using an if statement to control when to show or when not to show, but I'd much prefer to have this as part of a Current Selections string with the rest of my fields, especially within a native current selections box, though that's not critical to the requirement.
As a note, the product codes above are examples - they can be anything from a range of values so I can't use a wild to try and pick out a set formula; this set of products is actually derived from a search string evaluating sales over a set periods of time and returning only those products that have sold less than a number input by the user.
Any help, alternative solutions or steers appreciated!
Thanks.
Hi Aaron,
Something like this you mean?
Regards,
Andrey
Hi Andrey,
I'm a little unsure given the non-english text - it looks like what you're doing is searching for the string then selecting from the list though rather than selecting multiple values. At the minute once I achieve my list of product codes and then use select in field the current selections box ends up like:
Where you can see, rather than Qlik understanding this is multiple codes, it's treating it all as one entry and therefore it doesn't break the max values limit. I want this rather to show "45 of 1020" like it has done with my Category field below. Does that make sense?
Hi,
You can set the max values that shows in Current Selections.
Thank you, now I understand your thought. I will write at once, if I have an idea.
Regards,
Andrey
This will likely not help. I understand the exact string returned - one value. Otherwise, the picture would've been "X of Y" for the field of ProductCode. Even with a zero value of the parameter "Max Values in Current Selections" in selecting of one line is shown a string value.
Hi,
Thanks - Unfortunately as Andrey said, this won't have an impact as Qlik is seeing my string as one entry, not treating them as multiple product codes. What I need to do is find a way for current selections to see it (or atleast treat it) as multiple values!
Did you ever find an elegant solution to this? I have the same problem when transferring selections from state A to state B. its ugly in the current selections box.
let me know.
Larry