0
votes

I have a View Panel with a datasource from a view where the selection is based on what the user has selected which I save in a hidden input. But I fail to show everything from the view besides the user has selected.

Code for what the user have choosen, in Filter by column value

var field = getComponent('inputHidden1').getValue();
return field;

As I wrote, I want to show everything from view except what's in my hidden input.

Excuse my bad english, hard to explain exactly how I mean when my english is not what it should be.

Thanks, Jonas

2
I suggest to highlight/dim shown values by client JS. In the back end it is resources intensive to filter OUT values from view, and you may get into performance problems. - Frantisek Kossuth
Thanks, I'll try it. I can not access the project from home, but would something like this work? var status = varTask.getColumnValue('Status'); var cssClass = ''; if (status == 'Expiring') { cssClass = 'yellowRow'; } else if (status == 'Late') { cssClass = 'redRow'; } return cssClass; - user3446407

2 Answers

0
votes

Filtering a view for a column value will show you all the rows which have the same value in the first column as your filter.

I think you could filter your view using an FT-Search query.

0
votes

I got it to work, here's my solution.

var namn = rowAdd.getColumnValue('Namn');
var field = getComponent('inputHidden1').getValue();
var cssClass;
if (namn == field) {
   cssClass = 'none';
} 
else {
   cssClass = 'name';
}
return cssClass;