Method GetEmpDemoTable

Summary

Get employee demographic table information

Remarks

Excludes any rows where the employee number is zero

Excludes any rows where the “Final check printed” flag has been set to “F” in the employee job file for the employee

Excludes any rows where the employee job has no corresponding employee demographic information

Excludes any rows where the pay frequency has been excluded in the “Pay Frequency” area of the “Time and attendance filters” function in the NaviLine Payroll application

Excludes any rows where the department, division, and activity have been excluded in the “Department/Division/Activity” area of the “Time and attendance filters” function in the NaviLine Payroll application

Excludes any rows where the authorized department, division, and activity have been excluded in the “Department/Division/Activity” area of the “Time and attendance filters” function in the NaviLine Payroll application

Excludes any rows where the position has been excluded in the “Positions” area of the “Time and attendance filters” function in the NaviLine Payroll application

Excludes any rows where the authorized position has been excluded in the “Positions” area of the “Time and attendance filters” function in the NaviLine Payroll application

Excludes any rows where the employee unique key is less than zero

Excludes any rows where the employee job has been excluded in the “Employee Job” area of the “Time and attendance filters” function in the NaviLine Payroll application

Requires

Input Parameters

NameTypeLengthDescription
None No input parameters to pass

Example

GET http://localhost/FusionServices/v3/Naviline/Payroll/EmpDemoTable

Return Values

NameDescription
ErrorCode Error Code
ErrorDescription Error Description
UNIQUEID Unique ID (numeric)
EMPLOYEENUMBER Employee number (numeric)
EMPLOYEEUSERID Employee user ID
LASTNAME Last name
FIRSTNAME First name
MIDDLEINITIAL Middle initial
EMPLOYEEFULLNAME Employee full name
STREETADDRESS Street address
STREETADDRESS2 Street address (2nd line)
CITY City
STATE State
ZIPCODE Zip code
COUNTRYCODE Country code
AREACODE Area code (numeric)
PHONENUMBER Phone number (numeric)
CELLAREACODE Cell area code (numeric)
CELLPHONE Cell phone number (numeric)
SEX Sex
BIRTHDATE Birthdate (CCYYMMDD - numeric)
STATEOFBIRTH State of birth
COUNTRYOFBIRTH Country of birth
MARITALSTATUS Marital status
HEIGHTFEET Height feet (numeric)
HEIGHTINCHES Heigh inches (numeric)
WEIGHTPOUNDS Weight (in pounds - numeric)
LASTPHYSICALDATE Date of last physical (CCYYMMDD - numeric)
LASTPHYSICALPASSFAIL Last physical pass/fail
BLOODTYPE Blood type
HANDICAPCODE Handicap code
EMERGENCYNAME#1 Emergency contact name (1st)
EMERGENCYRELATION#1 Emergency contact relationship (1st)
EMERGENCYAREACODE#1 Emergency contact area code (1st)
EMERGENCYPHONE#1 Emergency contact phone number (1st)
EMERGENCYAREACODE#3 Emergency contact area code (3rd)
EMERGENCYPHONE#3 Emergency contact phone number (3rd)
EMERGENCYNAME#2 Emergency contact name (2nd)
EMERGENCYRELATION#2 Emergency contact relationship (2nd)
EMERGENCYAREACODE#2 Emergency contact area code (2nd)
EMERGENCYPHONE#2 Emergency contact phone number (2nd)
EMERGENCYAREACODE#4 Emergency contact area code (4th)
EMERGENCYPHONE#4 Emergency contact phone number (4th)
EDUCATIONCODE Education code
COLLEGECREDITS College credits
DRIVERSLICENSETYPE Driver’s license type code
DRIVERSLICENSENUMBER Driver’s license number
LICENSEEXPIRATIONDATE Date of driver’s license expiration (CCYYMMDD - numeric)
USCITIZEN U.S. citizen
LIMITEDENGLISH Limited English
ETHNICCODE Ethnic code
VETERANFLAG Veteran flag
EMAILADDRESS Email address
EMPLOYEECONFIDENTIAL Employee confidential flag
EMPLOYEEDEMOGRAPHICKEY Employee demographic key
SUFFIX Suffix

Error Details

Error CodeError Message
00000 Success
00001 Error = Invalid environment parameters
Other SQL state for SQL error

Sample Responses

Sample Code

using System.Net;
using Newtonsoft.Json.Linq;

public void MethodName(parms)
{
    string uri = "http://localhost/FusionServices/v3/Naviline/Payroll/EmpDemoTable";
    WebClient wc = new WebClient();
    wc.Headers.Set("X-APPID", "YOURID");
    wc.Headers.Set("X-APPKEY", "YOURKEY");
    string stringResult = wc.DownloadString(new Uri(uri));
    
    JObject response = JObject.Parse(stringResult);
    string error = response["OutputParms"]["ErrorCode"].ToString();
    if (error == "0000")
    {
        JArray jRows = (JArray)response["Rows"];
        foreach (JObject row in jRows)
        {
             string UNIQUEID = row["UNIQUEID"].ToString();
             string EMPLOYEENUMBER = row["EMPLOYEENUMBER"].ToString();
             string EMPLOYEEUSERID = row["EMPLOYEEUSERID"].ToString();
             string LASTNAME = row["LASTNAME"].ToString();
             string FIRSTNAME = row["FIRSTNAME"].ToString();
             string MIDDLEINITIAL = row["MIDDLEINITIAL"].ToString();
             string EMPLOYEEFULLNAME = row["EMPLOYEEFULLNAME"].ToString();
             string STREETADDRESS = row["STREETADDRESS"].ToString();
             string STREETADDRESS2 = row["STREETADDRESS2"].ToString();
             string CITY = row["CITY"].ToString();
             string STATE = row["STATE"].ToString();
             string ZIPCODE = row["ZIPCODE"].ToString();
             string COUNTRYCODE = row["COUNTRYCODE"].ToString();
             string AREACODE = row["AREACODE"].ToString();
             string PHONENUMBER = row["PHONENUMBER"].ToString();
             string CELLAREACODE = row["CELLAREACODE"].ToString();
             string CELLPHONE = row["CELLPHONE"].ToString();
             string SEX = row["SEX"].ToString();
             string BIRTHDATE = row["BIRTHDATE"].ToString();
             string STATEOFBIRTH = row["STATEOFBIRTH"].ToString();
             string COUNTRYOFBIRTH = row["COUNTRYOFBIRTH"].ToString();
             string MARITALSTATUS = row["MARITALSTATUS"].ToString();
             string HEIGHTFEET = row["HEIGHTFEET"].ToString();
             string HEIGHTINCHES = row["HEIGHTINCHES"].ToString();
             string WEIGHTPOUNDS = row["WEIGHTPOUNDS"].ToString();
             string LASTPHYSICALDATE = row["LASTPHYSICALDATE"].ToString();
             string LASTPHYSICALPASSFAIL = row["LASTPHYSICALPASSFAIL"].ToString();
             string BLOODTYPE = row["BLOODTYPE"].ToString();
             string HANDICAPCODE = row["HANDICAPCODE"].ToString();
             string EMERGENCYNAME#1 = row["EMERGENCYNAME#1"].ToString();
             string EMERGENCYRELATION#1 = row["EMERGENCYRELATION#1"].ToString();
             string EMERGENCYAREACODE#1 = row["EMERGENCYAREACODE#1"].ToString();
             string EMERGENCYPHONE#1 = row["EMERGENCYPHONE#1"].ToString();
             string EMERGENCYAREACODE#3 = row["EMERGENCYAREACODE#3"].ToString();
             string EMERGENCYPHONE#3 = row["EMERGENCYPHONE#3"].ToString();
             string EMERGENCYNAME#2 = row["EMERGENCYNAME#2"].ToString();
             string EMERGENCYRELATION#2 = row["EMERGENCYRELATION#2"].ToString();
             string EMERGENCYAREACODE#2 = row["EMERGENCYAREACODE#2"].ToString();
             string EMERGENCYPHONE#2 = row["EMERGENCYPHONE#2"].ToString();
             string EMERGENCYAREACODE#4 = row["EMERGENCYAREACODE#4"].ToString();
             string EMERGENCYPHONE#4 = row["EMERGENCYPHONE#4"].ToString();
             string EDUCATIONCODE = row["EDUCATIONCODE"].ToString();
             string COLLEGECREDITS = row["COLLEGECREDITS"].ToString();
             string DRIVERSLICENSETYPE = row["DRIVERSLICENSETYPE"].ToString();
             string DRIVERSLICENSENUMBER = row["DRIVERSLICENSENUMBER"].ToString();
             string LICENSEEXPIRATIONDATE = row["LICENSEEXPIRATIONDATE"].ToString();
             string USCITIZEN = row["USCITIZEN"].ToString();
             string LIMITEDENGLISH = row["LIMITEDENGLISH"].ToString();
             string ETHNICCODE = row["ETHNICCODE"].ToString();
             string VETERANFLAG = row["VETERANFLAG"].ToString();
             string EMAILADDRESS = row["EMAILADDRESS"].ToString();
             string EMPLOYEECONFIDENTIAL = row["EMPLOYEECONFIDENTIAL"].ToString();
             string EMPLOYEEDEMOGRAPHICKEY = row["EMPLOYEEDEMOGRAPHICKEY"].ToString();
             string SUFFIX = row["SUFFIX"].ToString();
             // TODO - YOUR CODE HERE
        }
    }
}

$.get('http://localhost/FusionServices/v3/Naviline/Payroll/EmpDemoTable', function(response) {
    $('#resultDiv).html(response); 
 });

C# Razor MVC Sample Code

using System;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Collections.Specialized;
using FusionServiceHelper.Models;

// NOTE: Use the namespace generated when you add the class, so that it is correct.
namespace FusionRazor.Models
{
   public class GetEmpDemoTable
   {
       // Add property for each input param in order to map a field to it
       public GetEmpDemoTable()
       {
           //Set any defaults here
       }
   }
}
@* NOTE: Use Add->View to add the View. *@
@* NOTE: Check the 'Create strongly-typed view checkbox, and select the GetEmpDemoTable class. *@
@* NOTE: Select Edit as the Scaffold template. *@
@* NOTE: Use the @model line that is generated at the top.  Replace the rest with the lines below.
@model FusionRazor.Models.GetEmpDemoTable

@{
   ViewBag.Title = "GetEmpDemoTable";
   string myUrl = "http://localhost/FusionServices/v3/Naviline/Payroll/EmpDemoTable";
}

<h2>GetEmpDemoTable</h2>
@using (Html.BeginForm()) {
   @Html.AntiForgeryToken()
   @Html.ValidationSummary(true)
   <fieldset>
   <legend>GetEmpDemoTable</legend>
       <div class="editor-label">Use the fields below to change the values and resubmit.</div>
       <p>
       <input type="submit" value="Submit"/>
       </p>
   </fieldset>

}

@section Scripts {
   @Scripts.Render("~/bundles/jqueryval")
}
using System;
using System.Collections.Specialized;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using FusionServiceHelper.Models;

// NOTE: Replace 'MyController' with the name of your controller.

// 
// GET: /MyController/GetEmpDemoTable
public ActionResult GetEmpDemoTable()
{
   // Create a new instance of the model to pick up any default values.
   GetEmpDemoTable model =  new GetEmpDemoTable();

   // pass model to set to default values
   // NOTE: Change 'MyFolderPath' to the path to the .cshtml file.
   return View("~/Views/MyFolderPath/GetEmpDemoTable.cshtml", model);
}

// 
// POST: /MyController/GetEmpDemoTable
[HttpPost]
public ActionResult GetEmpDemoTable(FormCollection collection)
{
   string url = "v3/Naviline/Payroll/EmpDemoTable";
   // Get the value from each input field
   NameValueCollection inputParms = new NameValueCollection();

   try
   {
       // Send the request
       FusionServiceRequest request = new FusionServiceRequest();
       FusionServiceResult result = request.Get(url, inputParms);

       return View("Result", result);
   }
   catch(Exception e)
   {
       HandleErrorInfo info = new HandleErrorInfo(e, "MyController", "GetEmpDemoTable");
       return View("Error", info);
   }
}