Portal Engine
Version 2.x > Portal Engine > DocumentType - Fields & Tree Nodes View modes: 
User avatar
Member
Member
matt - 1/12/2007 7:43:38 PM
   
DocumentType - Fields & Tree Nodes
I have a document type that requires a field that will associate it with one of several nodes of a separate tree node. I know that I can use a query to specify values for a multi-select field in the document type. Is there a stored procedure that gives the node names from under a specific node or do I just need to create a query from scratch?

Example...

I have a tree that looks something like this

Main
-Industries
-Reviews
-Document


Under the Industries node there are documents about each industry. I would like each new document under the Reviews section to be able to pull from the list of nodes under Industries. Is that even possible?

User avatar
Member
Member
matt - 1/12/2007 7:55:43 PM
   
Re: DocumentType - Fields & Tree Nodes
Well, that was incredibly easy. I almost feel silly that I even asked.

For anyone that is interested, in the query for the field that I wanted to associate with another node I simply added this.

Select NodeID, NodeName from CMS_Tree where NodeParentID = (Select NodeParentID from CMS_Tree where NodeName = '<NameOfParentNode>')


User avatar
Member
Member
matt - 1/12/2007 8:04:24 PM
   
Re: DocumentType - Fields & Tree Nodes
Thought I'd mention that does not, recurse any sub-nodes that may beneath the main level of that node. It only returns the first level of nodes beneath whichever node you specify

User avatar
Member
Member
matt - 1/12/2007 8:21:00 PM
   
Re: DocumentType - Fields & Tree Nodes
Minor correction:

Select NodeID, NodeName from CMS_Tree where NodeParentID = (Select NodeID from CMS_Tree where NodeName = '<NameOfParentNode>')

User avatar
Guest
admin - 1/20/2007 6:13:44 PM
   
Re: DocumentType - Fields & Tree Nodes
Hi Matt,

Thank you for your post. It seems you were able to sort it out yourself. If you still need any help with that, please let me know.

Best Regards,