Print Page as PDF
Vendor Query (for CoreFLS) ICR (3740)

Vendor Query (for CoreFLS)    ICR (3740)

Name Value
NUMBER 3740
IA # 3740
DATE CREATED 2002/09/12
CUSTODIAL PACKAGE COMMUNICATIONS SERVICE LIBRARY
CUSTODIAL ISC Washington
USAGE Controlled Subscription
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE CSLVQ
NAME Vendor Query (for CoreFLS)
ORIGINAL NUMBER 3740
GENERAL DESCRIPTION
Vendor Query
-------------

Purpose: To allow a user to query CoreFLS for a vendor matching a given set of
search criteria

Behavior: The user is prompted for prompted for one or more query strings, as
follows.

>D VENQ^CSLVQ(.out,"NCS","A")

Vendor Name: CITI City: San Francisco State: CA

Any matching values are displayed to the user in the style of ^DIC. Each
matching value will have an associated multiline identifier consiting of the
vendor address. Once the user selects a record, the "out" array will be
populated with the set of attributes for that vendor reurned by CoreFLS (for
details, see "OUTPUT" below).

The set of fields for which the user will be prompted is controlled by the
second parameter to the vendor query (see below under "Syntax"). If no
parameters are supplied, the default is to query for name only. Any fields for
which the user supplies no value are ignored, otherwise, the search criterion
will be the Boolean AND of the supplied parameters (i.e., each field must
match).

By default, if the user enters an unquoted string, it will be intepreted as a
(case sensitive) initial substring. Thus, CITI matches CITIBANK, but Citi will
not. (In this case, if the user enters CITI, the string actually sent to
CoreFLS is "CITI%"). As an alternative, users may enter either exact matches
or patterns involving the SQL wildcard characters '%' and '_' in quotes. E.g.,

Vendor Name: "CITI%NK" City: "L_s Ang%es"


Example:

Vendor Name: "%TEMS%"
. . . . . . . .

Choose from:
1    ACCESS SYSTEMS
1116 SMITH ST
CHARLESTON, WV  25301

2    BARD ACCESS SYSTEMS
5425 W AMELIA EARHART DR
SALT LAKE CITY, UT  84116-3713

etc.


Select QUERY RESULTS SEQ NO: 2   BARD ACCESS SYSTEMS
5425 W AMELIA EARHART DR
SALT LAKE CITY, UT  84116-3713





Syntax:

D VENQ^CSLVQ(.out,flags,display_flags)


INPUT This call has three parameters, a reference to an array that will be
populated with the attributes of the selected vendor, a scalar variable
containing 0 or more flags indicating which fields should be used as input
parameters/searchable fields, and a scalar variabld containing 0 or more flags
controlling what will be displayed to the user as identifying text (i.e., as
Fileman identifiers).

The format of the output array is described below under "OUTPUT". The second
parameter may contain any combination of the following flags (order is
unimportant):


N = Name

n = Vendor Number

a = Area Code

p = Phone Number

C = City

S = State

T = Tax ID/SSN

1 = Address Line 1

2 = Address Line 2

3 = Address Line 3

P = Postal Code

c = Chain number

For example, to query by name and SSN, use "NT". If this parameter is omitted
(or if it is equal to the empty string), the default is to search by name
only. However, if a value is supplied, "N" will not be automatically added to
the list. Thus, "T" will cause the user to be prompted for Tax ID only.

The display_flags parameter may contain any combination of the following flags
(again, order is unimportant):

n = CoreFLS Vendor ID / CoreFLS Site ID

A = address

t = telephone no.

T = Tax ID

C = Chain no.

P = Participation code

a = Attributes (Purchasing, Pay-to, etc.)

Note: If the "n" flag is included, the CoreFLS vendor ID and CoreFLS site ID
will appear on the first line of the identifying text displayed for that
vendor with the vendor name immediately below.

If this parameter is missing or null, the default is to display only address
information (i.e., the default is "A").

OUTPUT

A single array is passed by reference ("out" in the above syntax example). If
the user selects a vendor, the array will be populated with the attributes of
that vendor as follows:


out("NAME") - Vendor name

out("NUMBER") - numeric vendor ID

out("INACTIVE") - vendor will be inactive after this date (FM format)

out("TAXID") - Tax ID

out("AREA_CODE") - area code

out("PHONE") - phone number

out("FAX_AREA_CODE") - FAX area code

out("FAX") - FAX number

out("ADDRESS1") - address line 1

out("ADDRESS2") - address line 2

out("ADDRESS3") - address line 3

out("CITY") - City

out("STATE") - State

out("COUNTY") - County

out("ZIP") - Postal code

out("COUNTRY") - Country

out("SITE_CODE") - Site Code

out("CHAIN_NO") - Chain Number

out("COMMENTS") - Comments

out("PARTICIPATION_CODE") - Participation  Code

out("LAST_UPDATED") - date vendor record last updated on CoreFLS

In addition, there are a number of optional vendor attributes. If an attribute
is present, the appropriate top level subscript will be set. For example, for
an EDI vendor, we will have

out("EDI_VENDOR")=1

The complete list of attribute subscripts is

ON_HOLD PRIMARY_PAY_TO RFQ PURCHASING PAY_TO PROCUREMENT_CARD PRICER_EXEMPT
FEE_VENDOR EDI_VENDOR PO_HOLD NEW_PAY_HOLD ALL_PAY_HOLD


Fields have no value will not appear in the out array

Errors: If an error should occur during the query, the node out("ERROR") will
be set. There are two special cases:

Network timeout - In this case, out("ERROR")="NETWORK TIMEOUT"

No Selection - If the user does not select a vendor (e.g., by exiting by
typing "^") it will be the case that out("ERROR")="NO SELECTION"

In all other cases, out("ERROR") will be set to the error message returned by
CoreFLS or possibly to a value indicating an internal error in the
Communications Service Library (the specific value being a string indicating
the nature of the error).

Caveat: Note that the vendor query API does not clear the out variable, so it
is best to explicitly NEW this variable (which should be namespaced) before
making the call.
STATUS Active
KEYWORDS
  • COREFLS
  • VENDOR
  • QUERY
DURATION Till Otherwise Agreed
ID CSLVQ
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
VENQ(.out,flags,display_flags)
This entry point is used to initiate a query to
CoreFLS for attributes of matching vendors. Optional flags control what
criteria the user is allowed to use to search and what identifying information
(in the sense of Fileman identifiers) will be displayed to the user. This
allows the application developer to control the look and feel of the query to
a certain extent and avoid asking for (or displaying) fields that are not
relevant to the given application.
VARIABLES TYPE VARIABLES DESCRIPTION
out Output
This variable is an array passed by reference. It is
used to return vendor attributes to the calling application, or to signal that
an error or other exceptional condition (network timeout, or user made no
selection) has occured. (This variable should be namespaced.)
flags Input
This variable is used to control which fields will be
used in the search process. (This variable should be namespaced.)
display_flags Input
This variable controls what identifying information
will be displayed to the user. (This variable should be namespaced.)
SUBSCRIBING PACKAGE