project QadFinancials > class BEmployee > API query SelectEmployeeLinkedToCreditor (optimised)


query filter (table tFilter)


tcBusinessFieldNametcDataTypetcOperator
iiCompanyIdi
iiUsr_IDi=
tCreditor.CreditorCocNumberc=,>=,>,<>,<=,<,begins,can-do,matches
tCreditor.CreditorCodec=,>=,>,<>,<=,<,begins,can-do,matches
tCreditor.CreditorDBNumberc=,>=,>,<>,<=,<,begins,can-do,matches
tCreditor.CreditorDebtorNumberc=,>=,>,<>,<=,<,begins,can-do,matches
tCreditor.CreditorIsTaxablel=,<>
tCreditor.CreditorIsTaxInCityl=,<>
tCreditor.CreditorIsTaxIncludedl=,<>
tCreditor.CreditorIsTaxReportl=,<>
tCreditor.CreditorTaxDeclarationi=,>=,>,<>,<=,<
tCreditor.CreditorTaxIDMisc1c=,>=,>,<>,<=,<,begins,can-do,matches
tCreditor.CreditorTaxIDMisc2c=,>=,>,<>,<=,<,begins,can-do,matches
tCreditor.CreditorTaxIDMisc3c=,>=,>,<>,<=,<,begins,can-do,matches
tCreditor.CreditorTIDNoticec=,>=,>,<>,<=,<,begins,can-do,matches
tCurrency.CurrencyCodec=,>=,>,<>,<=,<,begins,can-do,matches
tEmployee.EmployeeCodec=,>=,>,<>,<=,<,begins,can-do,matches
tEmployee.EmployeeEndDatet=,>=,>,<>,<=,<
tEmployee.EmployeeIsActivel=,<>
tEmployee.EmployeeIsActiveExpNotesl=,<>
tEmployee.EmployeeIsActiveTimeRegl=,<>
tEmployee.EmployeeIsExternall=,<>
tEmployee.EmployeeIsUserl=,<>
tEmployee.EmployeeStartDatet=,>=,>,<>,<=,<
tCreditor.TxclTaxClsc=,>=,>,<>,<=,<,begins,can-do,matches
tCreditor.TxuTaxUsagec=,>=,>,<>,<=,<,begins,can-do,matches
tCreditor.TxzTaxZonec=,>=,>,<>,<=,<,begins,can-do,matches


Parameters (internal)


iiCompanyIdintegerCompany id
iiUsr_IDinteger


query condition


  each Employee where
Employee.Company_Id = iiCompanyId AND

      first Creditor (inner-join) where
Creditor.SharedSet_Id = vi_CREDITOR_sharedset(iiCompanyId) AND
Creditor.Creditor_ID = Employee.Creditor_ID AND

      first Currency (inner-join) where
Currency.Currency_ID = Employee.Currency_ID AND

      first Usr (conditional-join) where
Usr.Usr_ID = iiUsr_ID


query sort order


Employee.Company_ID (ascending)
Employee.EmployeeCode (ascending)


query resultset tqSelectEmployeeLinkedToCreditor


field namedata typedb fielddescription
tiActivityCode_IDintegerEmployee.ActivityCode_IDActivity Code
tiBusinessRelation_IDintegerEmployee.BusinessRelation_IDBusiness Relation
tiClaimPriceList_IDintegerEmployee.ObsoleteClaimPriceList_IDClaim Price List
tiCompany_IDintegerEmployee.Company_IDLink to Company
tiCostCentre_IDintegerEmployee.CostCentre_IDDefault Cost Center Code
tiCreditor_IDintegerEmployee.Creditor_IDSupplier Code
tcCreditorCocNumbercharacterCreditor.CreditorCocNumberChamber of Commerce Number
tcCreditorCodecharacterCreditor.CreditorCodeSupplier Code
tcCreditorDBNumbercharacterCreditor.CreditorDBNumberCredit Agency Reference
tcCreditorDebtorNumbercharacterCreditor.CreditorDebtorNumberExternal Customer Number
tlCreditorIsTaxablelogicalCreditor.CreditorIsTaxableTaxable Supplier
tlCreditorIsTaxInCitylogicalCreditor.CreditorIsTaxInCityTax in City
tlCreditorIsTaxIncludedlogicalCreditor.CreditorIsTaxIncludedTax Is Included
tlCreditorIsTaxReportlogicalCreditor.CreditorIsTaxReportTax Report
tiCreditorTaxDeclarationintegerCreditor.CreditorTaxDeclarationTax Declaration
tcCreditorTaxIDMisc1characterCreditor.CreditorTaxIDMisc1Miscellaneous Tax 1
tcCreditorTaxIDMisc2characterCreditor.CreditorTaxIDMisc2Miscellaneous Tax 2
tcCreditorTaxIDMisc3characterCreditor.CreditorTaxIDMisc3Miscellaneous Tax 3
tcCreditorTIDNoticecharacterCreditor.CreditorTIDNoticeTID Notice
tiCurrency_IDintegerEmployee.Currency_IDRegistration Currency
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tcCustomCombo0characterEmployee.CustomCombo0Custom Combo Field
tcCustomCombo1characterEmployee.CustomCombo1Custom Combo Field
tcCustomCombo2characterEmployee.CustomCombo2Custom Combo Field
tcCustomCombo3characterEmployee.CustomCombo3Custom Combo Field
tcCustomCombo4characterEmployee.CustomCombo4Custom Combo Field
tcCustomCombo5characterEmployee.CustomCombo5Custom Combo Field
tcCustomCombo6characterEmployee.CustomCombo6Custom Combo Field
tcCustomCombo7characterEmployee.CustomCombo7Custom Combo Field
tcCustomCombo8characterEmployee.CustomCombo8Custom Combo Field
tcCustomCombo9characterEmployee.CustomCombo9Custom Combo Field
ttCustomDate0dateEmployee.CustomDate0Custom Date Field
ttCustomDate1dateEmployee.CustomDate1Custom Date Field
ttCustomDate2dateEmployee.CustomDate2Custom Date Field
ttCustomDate3dateEmployee.CustomDate3Custom Date Field
ttCustomDate4dateEmployee.CustomDate4Custom Date Field
tdCustomDecimal0decimalEmployee.CustomDecimal0Custom Decimal Field
tdCustomDecimal1decimalEmployee.CustomDecimal1Custom Decimal Field
tdCustomDecimal2decimalEmployee.CustomDecimal2Custom Decimal Field
tdCustomDecimal3decimalEmployee.CustomDecimal3Custom Decimal Field
tdCustomDecimal4decimalEmployee.CustomDecimal4Custom Decimal Field
tiCustomInteger0integerEmployee.CustomInteger0Custom Integer Field
tiCustomInteger1integerEmployee.CustomInteger1Custom Integer Field
tiCustomInteger2integerEmployee.CustomInteger2Custom Integer Field
tiCustomInteger3integerEmployee.CustomInteger3Custom Integer Field
tiCustomInteger4integerEmployee.CustomInteger4Custom Integer Field
tcCustomLong0characterEmployee.CustomLong0Custom Long Field
tcCustomLong1characterEmployee.CustomLong1Custom Long Field
tcCustomNotecharacterEmployee.CustomNoteCustom Note Field
tcCustomShort0characterEmployee.CustomShort0Custom Short Field
tcCustomShort1characterEmployee.CustomShort1Custom Short Field
tcCustomShort2characterEmployee.CustomShort2Custom Short Field
tcCustomShort3characterEmployee.CustomShort3Custom Short Field
tcCustomShort4characterEmployee.CustomShort4Custom Short Field
tcCustomShort5characterEmployee.CustomShort5Custom Short Field
tcCustomShort6characterEmployee.CustomShort6Custom Short Field
tcCustomShort7characterEmployee.CustomShort7Custom Short Field
tcCustomShort8characterEmployee.CustomShort8Custom Short Field
tcCustomShort9characterEmployee.CustomShort9Custom Short Field
tiDivision_IDintegerEmployee.Division_IDDefault Sub-Account Code
tiEmployee_IDintegerEmployee.Employee_IDRecord ID
tcEmployeeCodecharacterEmployee.EmployeeCodeEmployee Code. A code that identifies an employee. The code cannot match any other employee in the current entity or any other entities in the current domain.
If you leave the Employee Code field blank, the system automatically generates a number for the record based on the sequence defined in Employee Autonumber Create.
ttEmployeeEndDatedateEmployee.EmployeeEndDateEnd Date: The date when this employee terminated employment at your company.
This field is for reference and filtering report data.
tlEmployeeIsActivelogicalEmployee.EmployeeIsActiveActive: This field indicates if this is an active record.
api annotation:PartialUpdate = yes - defaults to true
tlEmployeeIsActiveExpNoteslogicalEmployee.EmployeeIsActiveExpNotesObsolete field
tlEmployeeIsActiveTimeReglogicalEmployee.EmployeeIsActiveTimeRegObsolete field
tlEmployeeIsExternallogicalEmployee.EmployeeIsExternalExternal Employee: Indicate if the employee is a contractor or not employed directly by your organization.
api annotation:PartialUpdate = yes - defaults to false
tlEmployeeIsUserlogicalEmployee.EmployeeIsUserUser: Indicate if this employee is also defined as a valid user in User Maintenance.
api annotation:PartialUpdate = yes - defaults to false
ttEmployeeStartDatedateEmployee.EmployeeStartDateStart Date: The date this employee was hired. This field is for reference and filtering report data.
api annotation:PartialUpdate = yes - defaults to the date the record was created
tiExpenseCode_IDintegerEmployee.ExpenseCode_IDExpense Code
ttLastModifiedDatedateEmployee.LastModifiedDateLast Modified Date
tiLastModifiedTimeintegerEmployee.LastModifiedTimeLast Modified Time
tcLastModifiedUsercharacterEmployee.LastModifiedUserLast Modified User
tcTxclTaxClscharacterCreditor.TxclTaxClsTax Class
tcTxuTaxUsagecharacterCreditor.TxuTaxUsageTax Usage
tcTxzTaxZonecharacterCreditor.TxzTaxZoneTax Zone
tiUsr_IDintegerEmployee.Usr_IDLogin
EmployeeCustomcharactercalculatedcustom fields
CreditorCustomcharactercalculatedcustom fields
CurrencyCustomcharactercalculatedcustom fields
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(Employee),rowid(Creditor),rowid(Currency),rowid(Usr)


Internal usage


unused


Sample code: how to call this query through RPCRequestService (QXtend Inbound)

define temp-table ttContext no-undo
    field propertyQualifier as character
    field propertyName as character
    field propertyValue as character
    index entityContext is primary unique
        propertyQualifier
        propertyName
    index propertyQualifier
        propertyQualifier.

define dataset dsContext for ttContext.

define variable vhContextDS as handle no-undo.
define variable vhExceptionDS as handle no-undo.
define variable vhServer as handle no-undo.
define variable vhInputDS as handle no-undo.
define variable vhInputOutputDS as handle no-undo.
define variable vhOutputDS as handle no-undo.
define variable vhParameter as handle no-undo.

/* Create context */
create ttContext.
assign ttContext.propertyName = "programName"
       ttContext.propertyValue = "BEmployee".
create ttContext.
assign ttContext.propertyName = "methodName"
       ttContext.propertyValue = "SelectEmployeeLinkedToCreditor".
create ttContext.
assign ttContext.propertyName = "applicationId"
       ttContext.propertyValue = "fin".
create ttContext.
assign ttContext.propertyName = "entity"
       ttContext.propertyValue = "1000".
create ttContext.
assign ttContext.propertyName = "userName"
       ttContext.propertyValue = "mfg".
create ttContext.
assign ttContext.propertyName = "password"
       ttContext.propertyValue = "".

/* Create input dataset */
create dataset vhInputDS.
vhInputDS:read-xmlschema("file", "xml/bemployee.selectemployeelinkedtocreditor.i.xsd", ?).
vhParameter = vhInputDS:get-buffer-handle("tParameterI").
vhParameter:buffer-create().

assign vhParameter::icRange = "A"
       vhParameter::icRowid = ""
       vhParameter::iiRownum = 0
       vhParameter::iiNumber = 5 /* Number of records to read */
       vhParameter::icSortColumns = ""
       vhParameter::ilCountOnly = false
       vhParameter::ilForwardRead = true
       vhParameter::iiMaximumBrowseRecordsToCount = 0.

vhParameter = vhInputDS:get-buffer-handle("tFilter").
vhParameter:buffer-create().

assign vhParameter::<field-name-1> = <field-value-1>
       vhParameter::<field-name-2> = <field-value-2>
       ...

/* Connect the AppServer */
create server vhServer.
vhServer:connect("-URL <appserver-url>").

if not vhServer:connected()
then do:
    message "Could not connect AppServer" view-as alert-box error title "Error".
    return.
end.

/* Run */
assign vhContextDS = dataset dsContext:handle.

run program/rpcrequestservice.p on vhServer
    (input-output dataset-handle vhContextDS by-reference,
           output dataset-handle vhExceptionDS,
     input        dataset-handle vhInputDS by-reference,
     input-output dataset-handle vhInputOutputDS by-reference,
           output dataset-handle vhOutputDS).

/* Handle output however you want, in this example, we dump it to xml */
if valid-handle(vhExceptionDS)
then vhExceptionDS:write-xml("file", "Exceptions.xml", true).

if valid-handle(vhOutputDS)
then vhOutputDS:write-xml("file", "Output.xml", true).

/* Cleanup */
vhServer:disconnect().
assign vhServer = ?.

if valid-handle(vhInputDS)
then delete object vhInputDS.

if valid-handle(vhOutputDS)
then delete object vhOutputDS.

if valid-handle(vhExceptionDS)
then delete object vhExceptionDS.