Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Display name of currently selected field along with table name

Hi All ,

I have a QVW with many fields. I want the user to be able to find which table a field belongs to whenever a user makes any selection in that field.

To solve this issue, I created a table box with the dimensions $Field, $Table. But, guess I need to play around with it to achieve the desired functionality

Please have a look at the attached qvw for the problem statement. If I make a selection in the field "Country", I should be able to see only the second row of the table box. If I make a selection in the field "City", I should be able to see row 1 and 3. If I make selections in all fields, I should be able to see all rows of the table box.

I know that the getcurrentselections() function will help, but I was unable to solve the problem.

Thanks,

Neeraj

2 Replies
johnw
Champion III
Champion III

I think you were close to getting it.  You can do it with the tools you mention, $Field, $Table and getcurrentselections().  It's just a matter of how to combine the pieces to make the chart you want.  Make a straight table.

Dimension 1 = =if(index(getcurrentselections(),$Field&':'),$Field)
Dimension 2 = $Table

Suppress nulls for dimension 1.  And on the presentation tab, do NOT suppress zero values.  Worked for me, but I'm too lazy to save and then repost the file.  But if you have any trouble, I can go ahead and do that.

Not applicable
Author

Thanks a ton John. It works fine.