1

In Drupal 8, I have a content type Medical Records that has a field that is an Entity Reference to Users. I want to create a View which will display Medical Records with that field for the currently logged in user.

How can I do that?

2

you have to create a contextual filter, which will take current user as default value, you can find nice explanation and screenshots here:

http://redcrackle.com/blog/adding-contextual-filter-view-drupal-8

Just filter on Content: your field name instead of Content: Authored by

1
  • Though true and a nice tutorial, please include the essential part of the post in your answer, in case the link goes down. It is missing the crucial part that you should choose to provide a default value and set it to the ID of the current user. Sep 23 '17 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.