This page (revision-4) was last changed on 26-Nov-2021 10:22 by khiggs

This page was created on 26-Nov-2021 10:22 by khiggs

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
4 26-Nov-2021 10:22 5 KB khiggs to previous
3 26-Nov-2021 10:22 4 KB khiggs to previous | to last
2 26-Nov-2021 10:22 7 KB khiggs to previous | to last
1 26-Nov-2021 10:22 7 KB khiggs to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 68 changed one line
/
//
At line 79 removed 34 lines
[More User Formula Examples|USER_FORMULA_EXAMPLES]
This function can be tested with the following select statements:
* {{SELECT ACME_PADAYS(12345) FROM DUAL;}} where 12345 is the ID of an employee's EMPLOYMENT record ([IEEI])
* {{SELECT ACME_PADAYS(ID) FROM P2K_HR_EMPLOYMENTS WHERE ...}}etc. will take the ID straight from the table.
!!Table Definition (IMCD)
Once we have the function defined and working, we can extend the table (in our example [P2K_HR_EMPLOYMENTS]) to include this User Formula Column. This is done in the [IMCD] screen by adding a new column with the following fields filled in:
;[Sequence]:It is recommended that you start your sequencing at 9000 and work down, so as to not collide with provided sequence numbers
;[Column Name|COLUMN_NAME]:The name you wish to refer to this column in screen design. It is recommended that you start your column name with the same identifier as your function, so as to preclude confusion with provided values. (i.e. ACME_xxxx)
;[Prompt|FIELD_PROMPT]:This is optional, but recommended. Any prompt you provide here will be used in screen layouts, but can always be overridden at each usage.
;[Column Usage|COLUMN_USAGE]: __Must be User Formula__
;[Data Type|DATA_TYPE]: Must be the same type that the function returns (Number, Date, Varchar2)
;[Domain Name|DOMAIN]: __Must be of the type indicated by the function return__ ([DATE] for date fields; [VARCHARnn] for character fields (e.g. VARCHAR30); [NUMBERn] for whole number fields; [AMTnn]Vn for numeric fields with decimals, must be one of the standard set.
;[Length|VALUE_LENGTH]: Optional, but recommended
;[Format|VALUE_FORMAT]: Optional, but may be used for date or number variables
;[User Formula (Defaulted From)|DEFAULT_FROM]: __Must contain the name of the PL/SQL Function__
%%information
Note that once the field has been added to the table, you will not see this new field right away as this information is key to the application and thus will only be picked up on an instance restart.
Restart the application instance.
%%
!!Screen Definition (IMFD)
Now that we have a field on the table that will return to us the value we wish, we can add this field to any form that has access to the ID referred to in the function / table definition. This is performed on the [IMFD] screen's form layout tab.
It is important to note that any such fields added, must be added with:
;[Item Type|ITEM_TYPE]:''Display Only'' so end users are not given the impression that they can update this value on the screen indicated.
;[Item Usage|FORM_ITEM_USAGE]: ''User Defined'' so it is not overlaid by a subsequent release.