How can I create a new content by adding another two contents of same content type? My situation is I have one content type 'Student' and in another content type 'Receipts' whi has one field called months (list field) which stores the fee paid for each term (eg. April, May, June). the student pays fee for term wise, for term2 fee another Receipt content is created...

Then I acreated a view (Student + Receipts), It displays like

No Name Class Paid Months 1 Sravan 10 A Apr, May, June 2 Sravan 10 A Sep, Oct, Nov, Dec 3 Manohar 9 B Sep, Oct, Nov, Dec (Joined only on Sep) 4 Sreeram 8 C (No Fee Paid Yet)

I want to find those who did not paid the fee for Apr, May, June..

but when I displayed it shows 'Sravan' in the list cause it searches in his 2nd Receipt for Sep, Oct, Nov, Dec. (Apr is not in that list)

How can I solve this..

Sorry for my lengthy question.. I would like to explain my situation in details...

  • Hi, you should use entity reference module – harshal Aug 31 '14 at 10:32

Entity Reference Module should be used for such cases

To use the entity reference field in views you should follow the link given below https://www.youtube.com/watch?v=4Pdii7aFIvc http://codekarate.com/daily-dose-of-drupal/using-views-entity-reference-module-drupal-7

In the advanced section of views you have a relationship option where you will get an option to use a referenced entity for the view of content type A(student).

| improve this answer | |

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.