GetSessionContainerTags

(VTScada-Layer function. Must be called with a leading backslash.)

Description: Returns a dictionary of tag items below a given context (parent) tag.
Returns: Dictionary (see comments)
Usage: Script Only.
Function Groups: Variable
Related to: GetSessionContainers
Format: \ GetSessionContainerTags([Context, DoNotRecurseIntoContainer, NoContainersInTagsList, IncludeTagsInSubContainers, NavigationPath, PtrAutoDrilled]);
Parameters:  
Context
Optional. The name of the tag under which to look for containers. Defaults to VTSDB.
DoNotRecurseIntoContainer
Optional Boolean. Set TRUE to not recurse into container with details page (default is false).
NoContainersInTagsList
Optional Boolean. Set TRUE to prevent containers from appearing in the Tags list. Defaults to FALSE.
IncludeTagsInSubContainers
Optional Boolean. Dpecifies whether to filter out descendents of containers. Normally defaults to false. Defaults to true if Context is an array or if Context tag has contributors
NavigationPath
Optional array. Unique ID values of the tags that make up the path taken to get to our Context tag.
PtrAutoDrilled
Optional pointer to an array of the Unique ID values of tags that were skipped (drilled through) to arrive at the Context tag. These will be skipped by the "Go Up" button in the site list user interface.
Comments:

The returned dictionary will have the following structure:
["Title"] - The title to display for the returned data
["Tags"] - A list of tags that either exist under or contribute to the provided Context tag
["Containers"] - A list of Container tags that exist under the provided "Context" tag

Note that container tags use this function to obtain the list to display in a Sites page. If the container tag also includes a module named CustomSiteListGetSubTags or CustomSiteMapGetSubTags, (which must be a subroutine and must return an array of tag names) then GetSessionContainerTags will automatically call that module rather than GetTagList.

NavigationPath and PtrAutoDrilled are used only with Context tags that have an optional hook: CustomSiteListGetSubTags or CustomSiteMapGetSubTags.

Example:

To get all the tags in a site:

GetTags [
  If 1;
  [
    AllTags = GetTagList(\Root\Name   { Root Level    },
                         ShowChildren { DoRecursive   },
                         0            { Name Search   },
                         NameFilter   { Search String },
                         Invalid      { All Tag Types },
                         AreaFilter   { Area Filter   });

    TagDetailList = GetSessionContainerTags(AllTags { Tag List                      },
                                            TRUE    { Do not recurse into container },
                                            TRUE    { No containers in tag list     });

    GetSessionContainerTagLists(TagDetailList { Tag List   },
                                Invalid       { Containers },
                                Invalid       { IO Tags    },
                                Invalid       { AI Types   },
                                &Types        { AO Types   },
                                Invalid       { DI Types   },
                                Invalid       { DO Types   },
                                Invalid       { SO Types   },
                                Invalid       { AI Tags    },
                                &Tags         { AO Tags    },
                                Invalid       { DI Tags    },
                                Invalid       { DO Tags    },
                                Invalid       { SO Tags    });

    Return(Invalid);
  ]
]