Using DBMS_LOB.SUBSTR(field_name,250,1) to convert to varchar, field_name is the CLOB column .
Thursday, 9 December 2021
Tuesday, 16 November 2021
Date Format in BI Publisher
Format Current Date
Date: <?xdoxslt:sysdate(‘DD-MON-YYYY HH24:MI’)?>
Format Date Variable
<?format-date:A.CLASS_ATTEND_DT;'DD-MON-YYYY'?>
Saturday, 6 November 2021
AWE Ad Hoc Approver is disappearing
I’ve got a custom AWE process, and when I try to add an Ad Hoc reviewer , I click the + button, pick a person, and everything looks fine. But when I click the standard Save button, the Ad Hoc approver disappears. On the other hand, if I click the Approve button, the process moves forward and saves the Ad Hoc reviewer.
I got this to work. If you look at the class EOAW_CORE:ENGINE:AppInst you can see this comment.
/** Has this approval process instance been saved? The process is automatically saved upon launch (and upon approve/deny, etc.–see SaveAdHocs(), below), but may also be saved by calling the Save() method explicitly. This can be necessary when users add ad-hoc approvers while previewing the process, for instance. */
At first I tried
import EOAW_CORE:LaunchManager;
import EOAW_CORE:ApprovalManager;
Declare Function createStatusMonitor PeopleCode EOAW_MON_WRK.EOAW_FC_HANDLER FieldFormula;
Component string &c_apprAction;
Component EOAW_CORE:LaunchManager &c_aweLaunchManager;
Component EOAW_CORE:ApprovalManager &c_aweApprManager;
If (L_MINOR_APP_FRM.L_MINOR_ACTV.Value = "Y") Then
Local Record &headerRec = GetRecord(Record.L_MINOR_APP_FRM);
Local boolean &isApprover;
Local number &resp;
Evaluate &c_apprAction
When "A"
&c_aweApprManager.AddComments(%OperatorId, &headerRec, L_MINOR_APP_WRK.COMMENTS.Value);
&c_aweApprManager.DoApprove(&headerRec);
L_MINOR_APP_WRK.COMMENTS.Visible = False;
L_MINOR_APP_FRM.L_MIN_CRDNTR_CNFRM.DisplayOnly = True;
Break;
When "D"
&c_aweApprManager.AddComments(%OperatorId, &headerRec, L_MINOR_APP_WRK.COMMENTS.Value);
&c_aweApprManager.DoDeny(&headerRec);
L_MINOR_APP_WRK.COMMENTS.Visible = False;
L_MINOR_APP_FRM.L_MIN_CRDNTR_CNFRM.DisplayOnly = True;
Break;
When "S"
&c_aweApprManager.AddComments(%OperatorId, &headerRec, L_MINOR_APP_WRK.COMMENTS.Value);
L_MINOR_APP_FRM.L_MIN_CRDNTR_CNFRM.DisplayOnly = True;
L_MINOR_APP_WRK.COMMENTS.Visible = False;
If &c_aweApprManager.hasAppInst Then
&c_aweApprManager.the_inst.Save();
End-If;
Break;
End-Evaluate;
If &c_aweApprManager.hasAppInst Then
&isApprover = &c_aweApprManager.hasPending;
createStatusMonitor(&c_aweApprManager.the_inst, "D", Null, False);
L_MINOR_APP_WRK.DENIAL_BTN.DisplayOnly = True;
L_MINOR_APP_WRK.APPROVE_BTN.DisplayOnly = True;
L_MINOR_APP_WRK.SAVEBTN.DisplayOnly = True;
End-If;
End-If;
Allow AdHoc Approver in AWE
Certain approver is absent or could not approve the step on time (there is a timeout). So a special user could have the ability to modify ("bend") the current approval workflow in this special case. This is called adhoc approver.
In my case, AWE will grant a user the ability to modify the workflow if that user has enough permissions to do that (an specific role called "L_MINOR_APP_CORDINATOR_APRVR").
created a custom application package to handle this feature. The package will re-implement some methods.
import EOAW_MONITOR:ADHOC_OBJECTS:adhocAccessLogicBase;
import EOAW_CORE:ENGINE:StepInst;
import EOAW_CORE:ENGINE:StageInst;
class L_AdHocClass extends EOAW_MONITOR:ADHOC_OBJECTS:adhocAccessLogicBase
method allowInsert(&oprid As string, &stepBefore As EOAW_CORE:ENGINE:StepInst, &stepAfter As EOAW_CORE:ENGINE:StepInst) Returns boolean;
method allowDelete(&oprid As string, ¤tStep As EOAW_CORE:ENGINE:StepInst) Returns boolean;
method allowNewPath(&oprid As string, &stage As EOAW_CORE:ENGINE:StageInst) Returns boolean;
method allowRequestInfo() Returns boolean;
private
method isWorkFlowAdmin(&oprid As string) Returns boolean;
end-class;
method allowInsert
/+ &oprid as String, +/
/+ &stepBefore as EOAW_CORE:ENGINE:StepInst, +/
/+ &stepAfter as EOAW_CORE:ENGINE:StepInst +/
/+ Returns Boolean +/
/+ Extends/implements EOAW_MONITOR:ADHOC_OBJECTS:adhocAccessLogicBase.allowInsert +/
Return %This.isWorkFlowAdmin(&oprid);
end-method;
method allowDelete
/+ &oprid as String, +/
/+ ¤tStep as EOAW_CORE:ENGINE:StepInst +/
/+ Returns Boolean +/
/+ Extends/implements EOAW_MONITOR:ADHOC_OBJECTS:adhocAccessLogicBase.allowDelete +/
If (%Super.allowDelete(&oprid, ¤tStep)) Then
Return True;
Else
Return %This.isWorkFlowAdmin(&oprid);
End-If;
end-method;
method allowNewPath
/+ &oprid as String, +/
/+ &stage as EOAW_CORE:ENGINE:StageInst +/
/+ Returns Boolean +/
/+ Extends/implements EOAW_MONITOR:ADHOC_OBJECTS:adhocAccessLogicBase.allowNewPath +/
Return False;
end-method;
method allowRequestInfo
/+ Returns Boolean +/
/+ Extends/implements EOAW_MONITOR:ADHOC_OBJECTS:adhocAccessLogicBase.allowRequestInfo +/
Return False;
end-method;
method isWorkFlowAdmin
/+ &oprid as String +/
/+ Returns Boolean +/
Local string &is_admin;
Local string &strRol = "L_MINOR_APP_CORDINATOR_APRVR";
If (%Component = "L_MINOR_APP_APRVL") Then
SQLExec("SELECT ROLENAME FROM PSROLEUSER WHERE ROLEUSER = :1 AND ROLENAME = :2", &oprid, &strRol, &is_admin);
Return (All(&is_admin));
Else
Return False;
End-If;
end-method;
Tuesday, 2 November 2021
How do I pass bind variables to Message Explain text in message catalog?
&string = MsgGetExplainText(10001, 5, "Error Message", L_MINOR_CRSES.DESCR.Value);
&string1 = MsgGetExplainText(99999, 1, """");
Error (&string);
Friday, 8 October 2021
Auto Increment
Thursday, 7 October 2021
PS Query output column with multiple values to single column
try using LISTAGG function in expression part . In my case , one class has more than one instructor and I wanted to show them in one column instead of showing them in more than one row .
LISTAGG( '[ ' || rtrim(F.NAME) || ' (' || rtrim(E.INSTR_ROLE) || ')]' ,',') WITHIN GROUP (ORDER BY F.NAME) as InstructorName
Wednesday, 22 September 2021
Query Engine returns error. (228,118) PSXP_RPTDEFNMANAGER.ReportDefn.OnExecute Name:GenerateXmlFileFromQuery PCPC:115856 Statement:2268
Cause :
The issue is caused by the following setup: Access group not added to the Permission list.
Solution :
Add the relevant Query Tree with access group to the permission list for the user who is trying to print / access the BI report from a PeopleSoft page .
Monday, 7 June 2021
Error Field is Required : record.Fieldname(124,64)
I designed a custom page and used one record on level 0 and level 1 (Grid) .
After filling all the required fields , when I tried to save the page . I am getting the error " Field is required " .
This field is 1st field in a grid starting from left . If I try to make this field optional and then I will be facing the same error for next required field in the grid .
Solution :
As you can see in above screen shot that I have made level 0 fields editable . Once I make these fields read only and then try to save the page , it will save successfully .
Sunday, 7 March 2021
Fluid Page - Control Field & Related Display Field
Fluid Pages display all fields one-under-the-other in a
single column .There is a concept of a “Display Control Field” and a “Related
Display field.” For example, You have a Nationality code of SAU on a page and
you want to display the Nationality description on the page along side it.
PeopleSoft classic page show both fields on the same line and
fluid page will show Related Display field in next line under the Display
Control Field as shown below .
Every
HTML element has two type of display values: block and inline. A
block-level element always starts on a new line.
A
block-level element always takes up the full width available (stretches out to
the left and right as far as it can).
An
inline element does not start on a new line. An inline element only takes up as
much width as necessary.
By
default, fluid fields are displayed using the ‘block’ approach. We will change
this to ‘inline’ for the fields Nationality (English) and for the related
display field which is the long description of Nationality (English).
open
up the fluid properties for Nationality (English)
field on the page and add the inline style class: psc_display-inline.
Add
the following style to related display field
psc_display-inline psc_label-none
if
control and related display field are too much close , you may add
psc_padding-left20px
Saturday, 27 February 2021
3D Array in Peoplecode
Local array of array of array of string &ISTArray = CreateArrayRept(CreateArrayRept(CreateArrayRept("", 0), 0), 0);
Local number &n_element;
Local string &type = "IST";
&REC = CreateRecord(Record.L_MJR_DATA_TEMP);
&n_element = 1;
&n_element1 = 1;
For &r = 1 To &rs.ActiveRowCount
/*Get grid row*/
&row1 = &rs.GetRow(&r);
/* IST Inter School Transfer Grid Count */
If ( Not None(&row1.L_ADD_MAJOR_2.ACAD_PLAN.Value)) Or
( Not None(&row1.L_ADD_MAJOR_2.ACAD_GROUP.Value)) Then
&ISTArray.Push(&type);
&ISTArray [&n_element].Push(&row1.L_ADD_MAJOR_2.ACAD_GROUP.Value, &row1.L_ADD_MAJOR_2.ACAD_PLAN.Value);
&n_element1 = &n_element1 + 1;
&SQL = CreateSQL(SQL.L_GET_ISTGRID_SQL, &row1.L_ADD_MAJOR_2.ACAD_GROUP.Value, &lvl, "IST");
While &SQL.Fetch(&group, &max, &min)
&ISTArray.Push(&group);
&ISTArray [&n_element].Push(&max, &min);
&n_element = &n_element + 1;
End-While;
End-If;
End-For;
REM &CONT =0;
For &i = 1 To &ISTArray.Len
&GroupVal = &ISTArray [&i][1][1];
&MaxVal = &ISTArray [&i][2][1];
&MinVal = &ISTArray [&i][3][1];
REM MessageBox(0, "", 0, 0, "values are " | &GroupVal | "--" | &MaxVal | "--" | &MinVal | "--" | &ISTArray.Len);
End-For;
Tuesday, 19 January 2021
Dynamic View : “An error has occurred which requires that this page be cancelled. (15,4) A previous error message has been displayed showing an error from which the component processor cannot recover.
On selection of a value from dynamic view as a prompt table , we usually face the following error .
An error has occurred which requires that this page be cancelled. (15,4) A previous error message has been displayed showing an error from which the component processor cannot recover.
one of the reason which causes this error is to have two or more table join in SqlText as system is dynamically added the condition of order by clause without alias the column properly and basically column ambiguity cause this error .
Solution :
1. create a view in SqlText
2. Use ExpandSqlBinds(FetchSQL(), );
&acad_career= XMD_PROG_PLAN_V.ACAD_CAREER.Value;
&START_DT = XMD_PROG_PLAN_V.FROMDATE.Value;
&END_DT= XMD_PROG_PLAN_V.END_DATE.Value;
&acad_group= XMD_PROG_PLAN_V.ACAD_GROUP.Value;
&lvl= XMD_PROG_PLAN_V.ACADEMIC_LEVEL.Value;
L_ADD_MAJOR_2.ACAD_PLAN.SqlText = ExpandSqlBinds(FetchSQL(SQL.L_PLAN_SQL), &START_DT, &END_DT, &acad_group, &acad_career, &lvl);
Tuesday, 12 January 2021
Unable to change label properties of push button/hyperlink in Application Designer
Go to the Configuration Manager, then go to Client Setup tab, then check the “Install Workstation” checkbox, click OK or Apply.