SetPageFieldPageFieldName function
Syntax
SetPageFieldPageFieldName(Page.PageName, Record.RecordName, Field.FieldName, PageFieldName)
Description
Use the SetPageFieldPageFieldName function to add or change a page field name for a field. The page field name is set on the General tab of the page field properties. Changing a name to itself is not supported.
The first field on the page with the specified record name and field name is the field that's changed.
Parameters
| Parameter | Description |
|---|---|
|
PageName |
Specify the page containing the field you want to change. This name must be prefixed by the reserved word Page. |
|
RecordName |
Specify the record containing the field you want to change. This name must be prefixed by the reserved word Record. |
|
FieldName |
Specify the name of the field that you want to modify. This name must be prefixed by the reserved word Field. |
|
PageFieldName |
Specify the page field name that you want associated with the page field as a string. |
Returns
A constant value. The values are:
| Value | Description |
|---|---|
|
%MDA_Success |
Function completed successfully. |
|
%MDA_Failure |
Function didn't complete successfully. |
|
%MDA_PageNotFound |
The specified page wasn't found. |
|
%MDA_PageFieldNotFound |
The specified field wasn't found on the specified page. |
|
%MDA_Duplicate |
A second field by the same name was found on the page. Only the first page field name was changed. |
Example
The following example adds a page field name to a page field.
&ret = SetPageFieldPageFieldName(Page.ABSENCE_HIST, Record.ABSENCE_HIST,⇒
Field.EMPLID, "EMPLID")
The following example adds a page field name to a page field using dereferenced parameters.
&Pnl = "Page." | "ABSENCE_HIST";
&Rec = "Record." | "ABSENCE_HIST";
&Field = "Field." | "EMPLID";
&Name = "EMPLID"
&ret = SetPageFieldPageFieldName(@(&Pnl), @(&Rec), @(&Field), &Name);
Considerations Using this Function
This function is intended for use during configuration time only, before active runtime usage is initiated. Using this function during active runtime is not supported. Changes to data definitions are not recognized on currently loaded component. In general, changes aren't recognized until the component is reloaded.
WARNING:
These operations take place in a separate transaction from the page's save status: the initiation of any of these operations immediately changes the definitions, even if the page is subsequently cancelled.