Tuesday, March 10, 2009

About Fields

How can we find...
a) Type of a field ?
b) Attributes of a field in a record ( Key Field, Search Key Field, Required Field, etc... [Everything what we see in a record field property]) ?
c) Default value of a record-field ?
d) Prompt Table, Set Control Field associated with a record-field ?
e) and many such field/record-field attributes?

Prime source of information would be: PSDBFIELD, PSRECDEFN, PSRECFIELDALL, PSRECFIELDDB. However there are other tables (including Lang tables) which we might use based on our requirements but these 4 tables are being used more frequently.

If you wish to know how to work with USEEDIT, references are:
a) App Package EOEW: App Class Common-- Nicely written.
b) The Mystical USEEDIT -- Wisely explained.

*********************************************************************************
Update For 8.50 (11/11/2009)

Two new features have been added in 8.50 in terms of Record Field property:
a) Prompt Search Event
b) Type Ahead

Following Sql can be used to determine if these properties are set for ant record-field:

SELECT
A.RECNAME,
A.FIELDNAME,
CASE
WHEN bitand(A.USEEDIT, 134217728) > 0 THEN
'YES'
END AS PromptSearchEvent,
CASE
WHEN bitand(A.USEEDIT, 1073741824) > 0 THEN
'YES'
END AS TypeAhead
FROM PSRECFIELD A,
PSDBFIELD B
WHERE A.RECNAME = 'PS_ABC_TBL'
AND B.FIELDNAME='XYZ'
AND A.FIELDNAME = B.FIELDNAME

1 comment: