File Name
Syntax
AddParentRelation(O: OrgCacheType, p, c: INTEGER)
Parameters
O - organization cache
p - parent organization
c - child organization
Returns
Boolean - TRUE if relationship was added
Side Effects
None
Description
Adds a relationship between two nodes in the organization cache.
Dialog Forms Called
None
File Name
Syntax
AddToList(L1, L2: LIST OF STRING)
Parameters
L1 - list One
L2 - list Two
Returns
List of String
Side Effects
None
Description
Combines two lists together so that there are no duplicate items in the result list. This can be thought of as a set union operation.
Dialog Forms Called
None
File Name
Syntax
AddToSupportedOrgCache(Organization_ID: STRING)
Parameters
Organization_ID - new organization to add to cache
Returns
Integer
Side Effects
None
Description
Adds support for entry in the cache for the current user.
Dialog Forms Called
None
File Name
Syntax
AppendPublicFlag(Str: STRING, TBName: STRING)
Parameters
Str - existing where statement
TBName - table that will be selected from
Returns
String
Side Effects
None
Description
Returns a string that is the original Str string with a clause attached to it that allows public data in TBName to be viewed. Public data is identified by having an unknown or null organization_id value.
Dialog Forms Called
None
File Name
Syntax
CreateOrgNode(O: OrgCacheType, Organization: OrganizationRec
Parameters
O - organization cache
Organization - organization to add
Returns
Integer - position of new organization in O
Side Effects
None
Description
Inserts a new organization into the organization cache.
Dialog Forms Called
None
File Name
Syntax
FindorgNode(O: OrgCacheType, Organization_ID: STRING)
Parameters
O - organization cache
Organization_ID - organization to locate
Returns
Integer - position of Organization_ID in O
Side Effects
None
Description
Locates the position of Organization_ID in cache object O.
Dialog Forms Called
None
File Name
Syntax
ForceToSecureOption(Setting: INTEGER)
Parameters
Setting - new Setting for security:
Returns
Integer - old value of security setting
Side Effects
None
Description
Changes the security setting of multi-customer support.
Dialog Forms Called
None
File Name
Syntax
GetAncesAndDesc(O: OrgCacheType, Organization_ID: STRING)
Parameters
O - organization cache
Organization_ID - organization for which to find ancestors and
descendants.
Returns
List of string
Side Effects
None
Description
Returns a list of ancestor and descendant organizations to Organization_ID.
Dialog Forms Called
None
File Name
Syntax
GetAncesByIndex(O: OrgCacheType, Node: INTEGER)
Parameters
O - organization cache
Node - location in cache of the organization for which to find
ancestors.
Returns
List of string
Side Effects
None
Description
Returns a list of ancestor organizations to node.
Dialog Forms Called
None
File Name
Syntax
GetAncestors(O: OrgCacheType, Organization_ID: STRING)
Parameters
O - organization cache
Organization_ID - organization for which to find ancestors.
Returns
List of string
Side Effects
None
Description
Returns a list of ancestor organizations to Organization_ID.
Dialog Forms Called
None
File Name
Syntax
GetChildren(O: OrgCacheType, Organization_ID: STRING)
Parameters
O - organization cache
Organization_ID - organization for which to find children
Returns
List of string
Side Effects
None
Description
Returns a list of child organizations to Organization_ID.
Dialog Forms Called
None
File Name
Syntax
GetDescByIndex(O: OrgCacheType, Node: INTEGER)
Parameters
O - organization cache
Node - location in cache of the organization for which to find
descendants.
Returns
List of string
Side Effects
None
Description
Returns a list of descendant organizations to node.
Dialog Forms Called
None
File Name
Syntax
GetDescendants(O: OrgCacheType, Organization_ID: STRING)
Parameters
O - organization cache
Organization_ID - organization for which to find descendants.
Returns
List of string
Side Effects
None
Description
Returns a list of descendant organizations to Organization_ID.
Dialog Forms Called
None
File Name
Syntax
GetFullTree(O: OrgCacheType, Organization_ID: STRING)
Parameters
O - organization cache
Organization_ID - organization for which to find relatives.
Returns
List of string
Side Effects
None
Description
Returns a list of organizations that are in the same organization tree as Organization_ID.
Dialog Forms Called
None
File Name
Syntax
GetGroupsByOrg(TBName: STRING, Orgs: LIST OF STRING)
Parameters
TBNAme - table that is to be selected against
Orgs - list of currently supported organizations
Returns
List of string
Side Effects
None
Description
A select is performed using GetGroupsByOrgWhere and the output is returned.
Dialog Forms Called
None
File Name
Syntax
GetGroupsByOrgWhere(TBName, ColIdent: STRING, Orgs: LIST OF STRING, NoNeg: BOOLEAN)
Parameters
TBNAme - table that is to be selected
ColIdent - column identifier for the group ID column in your query
Orgs - list of currently supported organizations
NoNeg - determines if a negative lookup is desired ('NOT IN' rather than 'IN')
Returns
String - A where condition designed to get a list of groups out of
a table that can support the identified organizations
Side Effects
None
Description
A where string that is capable of getting a list of groups out of a table that can support the identified organizations. The groups must have explicit support for the organization.
Dialog Forms Called
None
File Name
Syntax
GetGroupUsers(TBName: STRING, Orgs: LIST OF STRING)
Parameters
TBNAme - table that is to be selected
Orgs - list of currently supported organizations
Returns
List of string
Side Effects
None
Description
A select is performed using GetGroupUsersByOrgWhere and the output is returned.
Dialog Forms Called
None
File Name
Syntax
GetGroupUsersByOrgWhere(TBName, ColIdent: STRING, Orgs: LIST OF STRING, NoNeg: BOOLEAN)
Parameters
TBNAme - table that is to be selected against
ColIdent - column identifier for the group id column in your query
Orgs - list of currently supported organizations
NoNeg - determines if a negative lookup is desired ('NOT IN' rather than 'IN')
Returns
STRING - A where condition designed to get a list of groups out of
a table that can support the identified organizations
Side Effects
None
Description
A where string that is capable of getting a list of groups out of a table that can support the identified organizations. The groups can have support for the organizations either by their own support, or a member's support relationship, but the group must have at least one member.
Dialog Forms Called
None
File Name
Syntax
GetOrgAncesAndDesc(orgs: LIST OF STRING)
Parameters
orgs - list of organizations for which to find Ancestors or Descendants
Returns
List of string
Side Effects
None
Description
Returns a list of Ancestor / Descendant organizations to each organization listed in orgs
Dialog Forms Called
None
File Name
Syntax
GetOrgAncesAndDescClause(Orgs: LIST OF STRING, TBName: STRING)
Parameters
Orgs - list of supported organizations
TBName - table that is to be selected against
Returns
String - A where condition based on the supported
organizations, the table to be selected from, and
organizations that are related to Orgs
Side Effects
None
Description
Constructs a where condition that will retrieve data from table TBName. The data returned will belong to the organizations in the Orgs list or ancestors and descendants of those organizations.
Dialog Forms Called
None
File Name
Syntax
GetOrgAncestorClause(Orgs: LIST OF STRING, TBName: STRING)
Parameters
Orgs - list of supported organizations
TBName - table that is to be selected against
Returns
String - A where condition based on the supported
organizations, the table to be selected from, and
organizations that are related to Orgs
Side Effects
None
Description
Constructs a where condition that will retrieve data from table TBName. The data returned will belong to the organizations in the Orgs list or ancestors of those organizations.
Dialog Forms Called
None
File Name
Syntax
GetOrgAncestors(orgs: LIST OF STRING)
Parameters
orgs - list of organizations for which to find ancestors
Returns
List of string
Side Effects
None
Description
Returns a list of ancestor organizations for each organization listed in orgs.
Dialog Forms Called
None
File Name
Syntax
GetOrganizationName(VAL Organization_ID)
Parameters
Organization_ID - ID of an organization
Returns
STRING - Name of organization for Organization_ID
Side Effects
None
Description
Returns the name of the organization identified by Organization_ID. The cache will be hit instead of the database id possible for the name. If the organization has not yet been cached, it (and its hierarchy) are loaded at this time.
Dialog Forms Called
None
File Name
Syntax
GetOrgChildClause(Orgs: LIST OF STRING, TBName: STRING)
Parameters
Orgs - list of supported organizations
TBName - table that is to be selected
Returns
String - A where condition based on the supported
organizations, the table to be selected from, and
organizations that are related to Orgs
Side Effects
None
Description
Constructs a where condition that will retrieve data from table TBName. The data returned will belong to the organizations in the Orgs list or children of those organizations
Dialog Forms Called
None
File Name
Syntax
GetOrgChildren(orgs: LIST OF STRING)
Parameters
orgs - list of organizations for which to find children
Returns
List of string
Side Effects
None
Description
Returns a list of child organizations to each organization listed in orgs.
Dialog Forms Called
None
File Name
Syntax
GetOrgDescendantClause(Orgs: LIST OF STRING, TBName: STRING)
Parameters
Orgs - list of supported organizations
TBName - table that is to be selected against
Returns
String - A where condition based on the supported
organizations, the table to be selected from, and
organizations that are related to Orgs
Side Effects
None
Description
Constructs a where condition that will retrieve data from table 'TBName'. The data returned belongs to the organizations in the Orgs list or descendants of those organizations.
Dialog Forms Called
None
File Name
Syntax
GetOrgDescendantClauseNP(Orgs: LIST OF STRING, TBName: STRING)
Parameters
Orgs - list of supported organizations
TBName - table that is to be selected
Returns
String - A where condition based on the supported
organizations, the table to be selected from, and
organizations that are related to Orgs
Side Effects
None
Description
Constructs a where condition that will retrieve data from table TBName. The data returned belongs to the organizations in the Orgs list or descendants of those organizations. This function intentionally neglects data that is considered to be public in TBName.
Dialog Forms Called
None
File Name
Syntax
GetOrgDescendants(orgs: LIST OF STRING)
Parameters
orgs - list of organizations for which to find descendants
Returns
List of string
Side Effects
None
Description
Returns a list of descendant organizations to each organization listed in orgs.
Dialog Forms Called
None
File Name
Syntax
GetOrgDirection(TBName: STRING)
Parameters
TBName - table for which to get the search direction
Returns
Integer
Side Effects
None
Description
The G_OrgCOnfig record is inspected and the current organization search direction is returned.
Dialog Forms Called
None
File Name
Syntax
GetOrgFullTree(orgs: LIST OF STRING)
Parameters
orgs - list of organizations for which to find relatives
Returns
List of string
Side Effects
None
Description
Returns a list of related organizations to each organization listed in orgs.
Dialog Forms Called
None
File Name
Syntax
GetOrgFullTreeClause(Orgs: LIST OF STRING, TBName: STRING)
Parameters
Orgs - list of supported organizations
TBName - table that is to be selected
Returns
String - A where condition based on the supported
organizations, the table to be selected from, and
organizations that are related to Orgs
Side Effects
None
Description
Constructs a where condition that will retrieve data from table TBName. The data returned belongs to the organizations in the Orgs list or in the same tree as those organizations.
Dialog Forms Called
None
File Name
Syntax
GetOrgInClause(TBName: STRING, Orgs: LIST OF STRING, AppendFlag: INTEGER)
Parameters
TBNAme - table that is to be selected
Orgs - list of currently supported organizations
AppendFlag - determines whether to add an 'AND' or 'WHERE'
Returns
String - A where condition constructed based on the supported
organizations, the table to be selected from, and
organizations that are related to Orgs in some way
Side Effects
None
Description
Based on the TBName specified, the organization search direction will be found in the G_OrgConfig record. Based on this direction, the appropriate function will be called. The function that is called will search the organization cache in a certain way (up the tree, down the tree, etc.). Based on output of these searches, a where statement will be assembled that correctly selects data from the table based on the viewable organizations.
Dialog Forms Called
None
File Name
Syntax
GetOrgList(whdl: WINDOW, TBName: STRING)
Parameters
whdl - window to query for currently supported organization
TBName - object type used which might help determine which
organizations are currently supported
Returns
List of string
Side Effects
Messages are sent to windows to query currently supported organizations.
Description
Discovers which organizations are currently supported. If mainWidow is queried, a list of all organizations supported by the currently logged user is returned.
Dialog Forms Called
None
File Name
Syntax
GetOrgMCSetting(TBName: STRING, ColName: STRING)
Parameters
TBName - table for which to get the setting
ColName - name of setting to get
Returns
String
Side Effects
None
Description
The G_OrgCOnfig record is inspected and the current organization setting for ColName is returned.
Dialog Forms Called
None
File Name
Syntax
GetOrgParentClause(Orgs: LIST OF STRING, TBName: STRING)
Parameters
Orgs - list of supported organizations
TBName - table that is to be selected
Returns
String - A where condition based on the supported
organizations, the table to be selected from, and
organizations that are related to Orgs
Side Effects
None
Description
Constructs a where condition that will retrieve data from table TBName. The data returned belongs to the organizations in the Orgs list or parents of those organizations.
Dialog Forms Called
None
File Name
Syntax
GetOrgParents(orgs: LIST OF STRING)
Parameters
orgs - list of organizations for which to find parents
Returns
List of string - Parent organizations to orgs
Side Effects
None
Description
Returns a list of parent organizations for each organization listed in orgs
Dialog Forms Called
None
File Name
Syntax
GetOrgRootClause(Orgs: LIST OF STRING, TBName: STRING)
Parameters
Orgs - list of supported organizations
TBName - table that is to be selected
Returns
String - A where condition based on the supported
organizations, the table to be selected from, and
organizations that are related to Orgs
Side Effects
None
Description
Constructs a where condition that will retrieve data from table TBName. The data returned will belong to the organizations in the Orgs list or roots of those organizations.
Dialog Forms Called
None
File Name
Syntax
GetOrgRoots(orgs: LIST OF STRING)
Parameters
orgs - list of root to find roots for
Returns
List of string
Side Effects
None
Description
Returns a list of root organizations for each organization listed in orgs.
Dialog Forms Called
None
File Name
Syntax
GetOrgs(TBName: STRING, Orgs: LIST OF STRING)
Parameters
TBNAme - table that is to be selected
Orgs - list of currently supported organizations
Returns
List of string
Side Effects
None
Description
Based on the TBName specified, the organization search direction will be found in the G_OrgConfig record. The organization hierarchy will be searched in this way. Any organizations visited in the search will be returned as being in the security domain. A special $Unknown organization is added to the list to represent the public organization.
Dialog Forms Called
None
File Name
Syntax
GetParents(O: OrgCacheType, Organization_ID: STRING)
Parameters
O - organization cache
Organization_ID - organization for which to find parents
Returns
List of string
Side Effects
None
Description
Returns a list of parent organizations to Organization_ID.
Dialog Forms Called
None
File Name
Syntax
GetRoots(O: OrgCacheType, Organization_ID: STRING)
Parameters
O - organization cache
Organization_ID - organization for which to find roots.
Returns
List of string
Side Effects
None
Description
Returns a list of root organizations to Organization_ID.
Dialog Forms Called
None
File Name
Syntax
GetRootsByIndex(O: OrgCacheType, Node: INTEGER)
Parameters
O - organization cache
Node - location in cache of the organization for which to find
roots.
Returns
List of string
Side Effects
None
Description
Returns a list of root organizations to node.
Dialog Forms Called
None
File Name
Syntax
GetSupportedGroupOrgs(group_id: STRING)
Parameters
group_id - a TSD group_ID
Returns
List of string
Side Effects
None
Description
A select is performed using GroupOrgsWhere and the output is returned.
Dialog Forms Called
None
File Name
Syntax
GetSupportedGroupUserOrgs(group_id: STRING)
Parameters
group_id - a TSD group_ID
Returns
List of string
Side Effects
None
Description
A select is performed using GroupUserOrgsWhere and the output is returned.
Dialog Forms Called
None
File Name
Syntax
GetSupportedUserGroupOrgs(user_id: STRING)
Parameters
user_id - a TSD user_id
Returns
List of string
Side Effects
None
Description
A select is performed using UserGroupOrgsWhere and the output is returned.
Dialog Forms Called
None
File Name
Syntax
GetSupportedUserOrgs(user_id: STRING)
Parameters
user_id - a TSD user_id
Returns
List of string
Side Effects
None
Description
A select is performed using UserOrgsWhere and the output is returned.
Dialog Forms Called
None
File Name
Syntax
GetSupportingOrgs(TBName: STRING, Orgs: LIST OF STRING)
Parameters
TBNAme - table that is to be selected
Orgs - list of currently supported organizations
Returns
List of string
Side Effects
None
Description
Based on the TBName specified, the organization search direction will be found in the G_OrgConfig record. Based on this direction, a new direction will be determined. The new direction is the compliment to the sound direction. Using this direction, we can determine which organizations can support the passed-in organizations, and ultimately, which users and/or groups can support it.
Dialog Forms Called
None
File Name
Syntax
GetUserGroupsByOrg(TBName: STRING, Orgs: LIST OF STRING)
Parameters
TBNAme - table that is to be selected
Orgs - list of currently supported organizations
Returns
List of string
Side Effects
None
Description
A select is performed using GetUserGroupsByOrgWhereExp and the output is returned.
Dialog Forms Called
None
File Name
Syntax
GetUsersGroupsByOrgWhere(TBName, ColIdent: STRING, Orgs: LIST OF STRING, NoNeg: BOOLEAN)
Parameters
TBNAme - table that is to be selected
ColIdent - column identifier for the user ID column in a query
Orgs - list of currently supported organizations
NoNeg - determines if a negative lookup is desired ('NOT IN' rather than 'IN')
Returns
String - A where condition designed to get a list of users out of
a table that can support the identified organizations
Side Effects
None
Description
A where string that gets a list of users out of a table that can support the identified organizations is returned. This function specifically finds users who have support for the organizations because of their own support or their group's support, but they must belong to at least one group.
Dialog Forms Called
None
File Name
Syntax
GetUsersGroupsByOrgWhereExp(TBName, ColIdent: STRING, Orgs: LIST OF STRING, NoNeg: BOOLEAN)
Parameters
TBNAme - table that is to be selected
ColIdent - column identifier for the user ID column in your query
Orgs - list of currently supported organizations
NoNeg - determines if a negative lookup is desired ('NOT IN' rather than 'IN')
Returns
String - A where condition designed to get a list of users out of
a table that can support the identified organizations
Side Effects
None
Description
A where string that gets a list of users out of a table that can support the identified organizations will be returned. This function specifically finds users who have support for the organizations because of their own support or their group's support (they do not have to belong to a group).
Dialog Forms Called
None
File Name
Syntax
GetUsersByOrg(TBName: STRING, Orgs: LIST OF STRING)
Parameters
TBNAme - Table that is to be selected against
Orgs - List of currently supported organizations
Returns
LIST OF STRING - output of RetrieveSingleQuery
Side Effects
None
Description
A select is performed using GetUsersByOrgWhere and the output is returned.
Dialog Forms Called
None
File Name
Syntax
GetUsersByOrgWhere(TBName, ColIdent: STRING, Orgs: LIST OF STRING, NoNeg: BOOLEAN)
Parameters
TBNAme - table that is to be selected
ColIdent - column identifier for the user ID column in your query
Orgs - list of currently supported organizations
NoNeg - determines if a negative lookup is desired ('NOT IN' rather than 'IN')
Returns
String - A where condition designed to get a list of users out of
a table that can support the ideintified organizations
Side Effects
None
Description
A where string that gets a list of users out of a table that can support the identified organizations will be returned. This support relationship only refers to the organizations that the user specifically has support for.
Dialog Forms Called
None
File Name
Syntax
GroupOrgsWhere(group_id: STRING)
Parameters
group_id - a TSD group_id
Returns
String
Side Effects
None
Description
Returns a select string that will get a list of organization_IDs for which that group_ID has explicit support.
Dialog Forms Called
None
File Name
Syntax
GroupUserOrgsWhere(group_id: STRING)
Parameters
group_id - a TSD group_id
Returns
String
Side Effects
None
Description
Returns a select string that will get a list of organization_IDs for which that group ID has support, either explicitly or through membership from a user.
Dialog Forms Called
None
File Name
Syntax
HandleAppendFlag(Str: STRING, AppendFlag: INTEGER)
Parameters
Str - string in front of which to add an 'AND' or 'WHERE'
AppendFlag - defines if an 'AND', 'WHERE', or nothing
is to be added to Str
Returns
String
Side Effects
None
Description
Adds an 'AND', 'WHERE', or nothing on the beginning of Str determined by the value of AppendFlag.
Dialog Forms Called
None
File Name
Syntax
InsureLoaded(org: STRING)
Parameters
org - organization to verify in the cache
Returns
None
Side Effects
If org has not been loaded, it is loaded at this time.
Description
Checks the organization cache to see if the organization identified by org has been loaded in the cache. If it has, nothing happens. If it has not, that organization's hierarchy is loaded at this time, starting with that organization.
Dialog Forms Called
None
File Name
Syntax
IsMultiCustSecure
Parameters
None
Returns
Integer
MC_NOTSECURE (0) if not secure,
MC_SECURE (2) if secure
Side Effects
None
Description
Returns the status of the multi-customer security option.
Dialog Forms Called
None
File Name
Syntax
ListToInClause(objList: LIST OF STRING, TBName: STRING)
Parameters
objList - list of values to put in the 'in clause'
TBName - name of the table for which the 'in clause' will be
generated
Returns
String
Side Effects
None
Description
Constructs an 'in clause' that defines a set of data, viewable to the user, by specifying a list of organizations that are currently supported.
Dialog Forms Called
None
File Name
Syntax
LoadNode(O: OrgCacheType, Organization_ID: OrganizationRec, REF Visited: LIST OF STRING)
Parameters
O - organization cache
Organization - organization to load into the cache
Visited - a list of organization IDs that have already been
loaded from the database. Maintained to prevent
infinite loops on loading organization trees.
Returns
None
Side Effects
None
Description
Loads the current node, its parents, and its children into the organization cache. This function calls itself recursively to allow the entire tree, starting with one node, to be loaded into the organization cache.
Dialog Forms Called
None
File Name
Syntax
LoadOrgRelatives(Organization_ID: STRING, GetParents: BOOLEAN)
Parameters
Organization_ID - organization at which to start the database load
GetParents - if TRUE, this function loads the parents of
Organization_ID. Otherwise, the children of
Organization_ID are loaded.
Returns
String
Side Effects
None
Description
Returns a list of organizations that are either parents or children of Organization_ID.
Dialog Forms Called
None
File Name
Syntax
RetrieveSingleCol(SelStr: STRING)
Parameters
SelStr - a select string that gets one column out of
any table or view
Returns
List of string
Side Effects
None
Description
SelString is executed against the database. Any output is put into a list of string that is returned to the calling function.
Dialog Forms Called
None
File Name
Syntax
SetOrgMCSetting(TBName: STRING, ColName, SettingVal: STRING)
Parameters
TBName - table for which to get the setting
ColName - name of setting to get
SettingVal - new setting value
Returns
INTEGER - 1 if successful, negative if failure
Side Effects
None
Description
The G_OrgCOnfig record is modified so that the current organization setting for ColName is set to SettingVal.
Dialog Forms Called
None
File Name
Syntax
SetOrgSearchDirection(TBNAme: STRING, newDirection: INTEGER)
Parameters
TBNAme - table that is to be selecte
newDirection - defines the new direction to search
Returns
Integer
Side Effects
None
Description
This allows a programmer to override the search direction defined for TBName. The old direction is returned so that the override can be temporary, and the old direction can be established as the current search direction.
Dialog Forms Called
None
File Name
Syntax
UserGroupOrgsWhere(user_id: STRING)
Parameters
user_id - a TSD user_id
Returns
String
Side Effects
None
Description
Returns a select string that will get a list of organization IDs for which that user_id has support, either explicitly or through membership to a group.
Dialog Forms Called
None
File Name
Syntax
UserOrgsWhere(user_id: STRING)
Parameters
user_id - a TSD user_id
Returns
String
Side Effects
None
Description
Returns a select string that will get a list of organization IDs for which that user ID has explicit support.
Dialog Forms Called
None