appendEmpAttribsAssignByIDNum() 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

  • Add an employee attribute assignment

Syntax

  • bool = AeXMLBridge.appendEmpAttribsAssignByIDNum(idNum, AeEmpAttribsAssign);

Parameters

Return Value

  • Boolean

Sample Code C

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
string empID = "1234";                                                    
// we are appending to employee "1234"

try
{
TAeEmployeeBasic employeeBasic = ws.getEmployeeBasicByIDNum(empID);

TAeAttribute[] attributes = ws.extractAttributes();

// just going to use the first one
TAeEmpAttribsAssign empAttribsAssign = new TAeEmpAttribsAssign()
{
AttribGUID = attributes[0].GUID,
Comment = "Anything goes here",
Filekey = employeeBasic.Filekey,
Rating = 1
};

bool itWorked = ws.appendEmpAttribsAssignByIDnum(empID, empAttribsAssign);

}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
return;
}

Sample Code VB.Net

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Dim empID As String = "1234"

Try
Dim employeeBasic As TAeEmployeeBasic = ws.getEmployeeBasicByIDNum(empID)
Dim attributes As TAeAttribute() = ws.extractAttributes()
Dim empAttribsAssign As TAeEmpAttribsAssign = New TAeEmpAttribsAssign() With
{
.AttribGUID = attributes(0).GUID,
.Comment = "Anything goes here",
.Filekey = employeeBasic.Filekey,
.Rating = 1
}

Dim itWorked As Boolean = ws.appendEmpAttribsAssignByIDnum(empID, empAttribsAssign)
Catch ex As Exception
MessageBox.Show(ex.Message)
Return
End Try

Remarks

  • Use extractAttributes to retrieve a list of GUID codes
  • Method will return true if record is added successfully, else false

Possible Errors

  • Employee with ID not found
  • Filekey does not exist

Alternate Method

appendEmpAttribsAssignByFilekey

extractAttributes
extractEmpAttribsAssignsByIDnum
getEmptyEmpAttribsAssign
removeEmpAttribsAssignByUniqueID

Back to Top