Dataview - Remove this.file.name from displayed results

What I’m trying to do

Hello, I’m not sure how best to explain my problem, so hopefully my example screenshot will help.

I want to track which characters have had which scenes/interactions with other characters. I have a folder, ‘Characters’, with each character profile in a separate document, and a folder, ‘Scenes’, which has a separate document for each scene, and I use dataview as to list in the character profiles which scenes that character has been a part of, and who else is in that scene.

Here’s an example of the properties, the dataview query, and the previewed result.

So, that all works as intended, but I was wondering if there was any way to remove, in this example, ‘Gus Fring’ from the characters list in the dataview, because we already know he’s in those scenes, because we’re looking at it from his character profile. I want to be able to use this.file.name in the query while omitting this.file.name from the displayed results, if it’s at all possible. Or perhaps if there’s another way to achieve what I’m looking for.

Do you mean to add WHERE file != this.file to your query?

2 Likes

I want to use this.file in the query, I just don’t want it to display in the results of the query.

Yeah, and if you use both WHERE clauses you should achieve your goal.

1 Like

I’m not sure I follow. If I include the clause you mentioned, there’s no difference in results.

It should remove this.file from the
result set, but looking a little more on your result you might want to remove it from the Characters in your second column?

Then try to use TABLE filter(Characters, (c) => c != this.file.name) as "Other characters"

And you could most likely remove my suggested WHERE clause. It was the answer of a related question wifi you didn’t ask… :slight_smile:

1 Like

It worked! Thank you thank you thank you! I’ve been puzzling over this for a few days now, next time I will know just to ask for help sooner :sweat_smile:

1 Like