Hi I am creating a site that has the following content types:

* Organization (Usernode)
* Program (define a program)
* Attendance Tracking (track attendance for the program added above)

I would like to create an admin view that shows me all the details for either program or the attendance tracking with data from the usernode. For example

Program Name
Organization Name
Province
Country
Postal Code

I'm just wondering what is the best way to have the Program and Attendance tracking content types reference this data. Would I need to create fields that query the database separately to get them into the content type?

Thanks, any help would be much appreciated.

Comments

nevets’s picture

I would use the Content Construct Kit (CCK) to create the content types and use Node Reference and User Reference for the references fields as appropriate. By using CCK you also get views integration.

chris.mccreery’s picture

I am using CCK and Node Reference. My issue seems to be that when the user creates a new program or attendance record after they've created their usernode to be able to create a view that displays the province or organization or postal code from the usernode type. How would I create a view like that? I can get them to display the author but not sure how to get the other data to display.

nevets’s picture

Add a relationship on the node reference field, this will give you access to the fields of the referenced node. After adding the relationship when you add/edit a field you may see a new choice called "Relationship" and which point you will be able to pick "Do not use a relationship" or the name of the relationship you added.

chris.mccreery’s picture

I think is where my issue comes in. I am designing the site for others to input data. So for example, a new user comes to the site, creates an account and usernode(Organizational Profile). From that point on any other content they create should automatically relate to the usernode info they submitted(province, postal code, etc.) They shouldn't have to select any of those with in the other content types they create using node reference I would like that to be associated automatically. Does that make any sense? Sorry I'm starting to confuse myself now.

nevets’s picture

You have the content types
* Organization (Usernode)
* Program (define a program)
* Attendance Tracking (track attendance for the program added above)

I am guessing Attendance Tracking has Node references to Organization(multiple) and Program(single).

A Organization (usernode) has
Program Name
Organization Name
Province
Country
Postal Code

And that when view a program you want to see attendance information and when viewing attendance information you want to see details from a usernode.

Is this correct?

chris.mccreery’s picture

I guess the relation is more like the following:

Organization(UserNode)
-Program(content type) - organization can have many program nodes
--Attendance Tracking(content type) - program can have many attendance tracking nodes

So as the administrator(for reporting purposes) I would want to create a view(s) where for instance I could see:
1. List of all Organizations, by province, city or org type
2. View all Programs created and sort them by Organization, province, postal code, city
3. View all Attendance Tracking and sort them by organizaiton, province, postal code, city, Program

Currently the Attendance tracking has a node reference for the users to select which Program they are tracking.
Right now as a regular user I am only able to see my own programs and attendance tracking.

Is that clear as mud now?

Thanks again for the help.

nevets’s picture

So what relates an Organization and Program? Is a program "owned" by a Organization simply because a Organization created it or is there a node relation?

Same questions of users and Attendance tracking, it the relation based on who created the node or is the a node relation between attendance tracking and organization?

chris.mccreery’s picture

Currently I don't think I am relating the program to the organization I am simply only allowing the user that is logged in to view his/her own created data so I don't think that creates a relationship(but i'm not really sure)

Same for the users and attendance tracking. They are allowed to "access own content" but I don't think I defined the relation for user to attendance tracking as I'm not really sure how to accomplish that.