1

enter image description here

I want to compare this field value with another field value

How can I do that?

Thank you very much!

4
  • You can consider the solution provided [here][1]. [1]: drupal.stackexchange.com/questions/44097/… – Anil Sagar Sep 24 '12 at 10:41
  • thank you, but view php module is still in dev version. – cobenash Sep 25 '12 at 2:46
  • i use hook_views_query_alter to achieve my goal. Thanks for sharing! – cobenash Sep 25 '12 at 5:58
  • Check the other answers on suggested solution, too. – leymannx Jan 27 '17 at 13:17
3

With latest views in 7 you have under global filters, "field comparison" filter that you can select any 2 fields which you added into fields of that view (they can be hidden fields) and that is it. Image below shows how this looks:

enter image description here

3
  • Is this still accurate? I can't seem to get it to come up in D8. I've got two node ID fields (one is a relationship), and I want to filter as long as those two ID fields are the same, but I'm only seeing Combine Filters in Global. – UnsettlingTrend Apr 12 '17 at 20:18
  • Same issue, this does not seem to be included in D8. There is a "combine" but no "compare" fields – Hudri Jun 6 '18 at 8:36
  • D8 issue tracking the feature: drupal.org/node/699252 – imclean Nov 2 '18 at 1:10

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