GeneXus provides a GXquery API wich allows developers to handle data types and methods to integrate queries made through GXquery within an GeneXus application.
The GXqueryQueriesTreeNode data type is used to known the complete tree of the metadata in where nesting another folders and queries. Is useful when you want to load a combo where the user can to choose.
Is the tree node name.
Is the tree node description.
Is the tree node type, and its possible values are:
Root. Indicates that is the tree root and is invisible in the web interface.
Folder. Indicates the the node is a folder.
Query. Indicates that is a query.
SharedQueries. Indicates that the queries are those shared with the user.
MyQueries. Indicates the node containing the queries owned by the user.
User. Indicates a user sharing queries with the current user. This nodes are nested in the SharedQueries node.
In the follow example, first instruction obtain, through the GetQueriesTree method, the list of the nodes into the GXqueryQueriesTreeNodeType collection.
After Else scope, the combo box called &NodeName is loaded with the For command making a string with a concatenation of Type and Name.
GXqueryQueriesTreeNodeType = &GXquerySession.GetQueriesTree(&ParentNodeType, &ParentNodeName, &Errors)
If &Errors.Count > 0
&GetQueriesTreeStatus = &Errors.Item(1).Message
For &GXqueryQueriesTreeNode in &GXqueryQueriesTreeNodes
&NodeName.AddItem(&GXqueryQueriesTreeNode.Type + ";" + &GXqueryQueriesTreeNode.Name, &GXqueryQueriesTreeNode.Type + ";" + &GXqueryQueriesTreeNode.Name)
GXquerySession data type