Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show selection in my table but not filter by it?

Hi -

I have a table that always shows details about current staff. If I filter on a name, I want the table to still show all current staff, but scroll to and highlight the name of the person from the filter.

What I've done: the table ignores current selections and I change the background and text color on the name when it matches the current selection. This works well.

What I need help with: I can't figure out how to get the chart to go to the correct row.I need to manually scroll to find the name. I know this is not default QV behavior, so can anyone suggest some hacks that I can maybe apply?

Thanks in advance!

1 Solution

Accepted Solutions
jopmoekotte
Contributor III
Contributor III

Hi Lynn,

If you would like to sort in the way you described, and following Fred's advice on changing the sort option to what is currently selected in the field 'Staff', you can sort the table in the following way:

go to your Sort tab in the table, add the following expression to the first field in the sorting list:

=IF(index(GetFieldSelections(Staff),Staff)>0,1,2)

(the field Staff is an example)

If you add a Set statement in the expressions, you can then show all the current staff, with the current selection sorted to the first rows.

example field Hours expression:

Sum (Hours)

new expression:

Sum ({<Staff=>}Hours)

I hope this answers your question.

Kind regards,

Jop

View solution in original post

4 Replies
fred_s
Partner - Creator III
Partner - Creator III

Is it an option to change the sort order to State?

Grtz Fred

Not applicable
Author

Hi Fred, Thank you for your reply.

It's a straight table, I don't have any alternate states set. I don't see an option to change the sort order to State. I'm relatively new to QV, so I may be missing something. Would you mind explaining further?

Lynn

jopmoekotte
Contributor III
Contributor III

Hi Lynn,

If you would like to sort in the way you described, and following Fred's advice on changing the sort option to what is currently selected in the field 'Staff', you can sort the table in the following way:

go to your Sort tab in the table, add the following expression to the first field in the sorting list:

=IF(index(GetFieldSelections(Staff),Staff)>0,1,2)

(the field Staff is an example)

If you add a Set statement in the expressions, you can then show all the current staff, with the current selection sorted to the first rows.

example field Hours expression:

Sum (Hours)

new expression:

Sum ({<Staff=>}Hours)

I hope this answers your question.

Kind regards,

Jop

Not applicable
Author

Jop, that was kind of awesome. Thank you. It works beautifully!