getWorkgroupViaCode() Method

Table of Contents

  1. Function
  2. Syntax
  3. Parameters
  4. Return Value
  5. Sample Code
  6. Remarks
  7. Possible Errors
  8. Alternate Method
  9. Related Methods

Function

  • Returns details about a specific sub workgroup using the sub workgroup code for a specified workgroup level

Syntax

  • AeWorkgroup = AeXMLBridge.getWorkgroupViaCode(WGLevel, WGCode);

Parameters

  • Integer - workgroup level (1 - 7)
  • String - sub workgroup code

Return Value

Sample Code

C#

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

int wgLevel = 1;
// working with Workgroup Level 1 (Location)

string wgCode = "1";
// Location code

try
{
TAeWorkgroup workgroup = ws.getWorkgroupViaCode(wgLevel, wgCode);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

VB.Net

1
2
3
4
5
6
7
8
9
10
11
12

Dim wgLevel As Integer = 1
' working with Workgroup Level 1 (Location)

Dim wgCode As String = "1"
' Location code

Try
Dim workgroup As TAeWorkgroup = ws.getWorkgroupViaCode(wgLevel, wgCode)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Remarks

  • Invalid WGCode will return an empty record

Possible Errors

  • WGLevel must be between 1 and 7

Alternate Method

getWorkgroupViaName

addDeptXlateItem
addWorkgroup
delWorkgroup
extractDeptXlateItems
extractWGXlates
getWorkgroup
getWorkgroupLevelDetails
getWorkgroups
getWorkgroupStruct
maintainWGXlate
nextWGNumForWGLevel
removeDeptXlateItem
removeWGXlate
setWorkgroup
setWorkgroupLevelLabels

Back to Top