Score:2

Set a dynamic filter value

pk flag

I want to construct a view with following constraints:

  • Show entries from the content-type XY AND it is authored by the currently logged in user

OR

  • Show entries from the content-type XY AND the first field/column corresponds to the currently logged in user

OR

  • Show entries from the content-type XY AND the second field/column corresponds to the currently logged in user

I do know about contextual filters, but I cannot use them when I want to introduce OR with filter groups as they are applied on the entire view.

Is it possible to input a dynamic value instead of a hardcoded value? - in my case the currently logged in user: enter image description here

No Sssweat avatar
ua flag
You can change its value programmatically using `hook_views_pre_view` [as shown here](https://www.drupal.org/forum/support/module-development-and-code-questions/2015-04-27/change-filter-value-in-views#comment-12407408)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.