So I just finished learning about the Relationship API and now I have questions about a possible use of this.
Let's use an example to describe my confusion. I have a Member 'AAAA' that creates a node of DocType 'Organization'. There is now a logical relationship between the member and the new organization. In my mind there are two ways this can be accomplished.
The first is using the Relationship API. When we submit the form, we programmatically create the relationship. The second way, is to have a property in the docType called Member. When you member creates the organization, the member id is then saved in the organization. Also creating a relationship, just not using the API.
Now here is where the issues come in. As an administrator, if I click on the organzation node and need to see who created the node, there really isn't a way to do this using the relationship api. In fact, from my understanding, unless I build a control to do this, there really isn't a way to see relationship data on a node by node basis.
I understand I probably can just look at the created by field for this example, but now let's extend the example further. A member creates an organization and also creates events. On the live site, a user can click an organization and see all of the events that are linked to that organization (aka....events created by the same member). Again, seems like a perfect opportunity to use the relationship API. When a new event is created, it gets a dual relationship with the organizaiton and the member.
Again, the problem now stems from the fact that an administrator cannot easily view the item from within the CMS and know which member created it and which organization it is linked to. Seems to me, that it would just be easier to have a dataType on the Event that is a dropdown list containing all of the organizations (100-200 items). This would then display the organizations name. Makes it much easier for the administrator to look at the data, and also if we implemented a workflow for the administrator to approve the changes since they can immediately view who made them.
Am I missing anything? Is my understanding of the relationship API correct?
Questions about Relationship API
So I just finished learning about the Relationship API and now I have questions about a possible use of this.
Let's use an example to describe my confusion. I have a Member 'AAAA' that creates a node of DocType 'Organization'. There is now a logical relationship between the member and the new organization. In my mind there are two ways this can be accomplished.
The first is using the Relationship API. When we submit the form, we programmatically create the relationship. The second way, is to have a property in the docType called Member. When you member creates the organization, the member id is then saved in the organization. Also creating a relationship, just not using the API.
Now here is where the issues come in. As an administrator, if I click on the organzation node and need to see who created the node, there really isn't a way to do this using the relationship api. In fact, from my understanding, unless I build a control to do this, there really isn't a way to see relationship data on a node by node basis.
I understand I probably can just look at the created by field for this example, but now let's extend the example further. A member creates an organization and also creates events. On the live site, a user can click an organization and see all of the events that are linked to that organization (aka....events created by the same member). Again, seems like a perfect opportunity to use the relationship API. When a new event is created, it gets a dual relationship with the organizaiton and the member.
Again, the problem now stems from the fact that an administrator cannot easily view the item from within the CMS and know which member created it and which organization it is linked to. Seems to me, that it would just be easier to have a dataType on the Event that is a dropdown list containing all of the organizations (100-200 items). This would then display the organizations name. Makes it much easier for the administrator to look at the data, and also if we implemented a workflow for the administrator to approve the changes since they can immediately view who made them.
Am I missing anything? Is my understanding of the relationship API correct?
is working on a reply...