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.




Wednesday, 23 December 2020

Populate Dynamic Drop down using peoplecode

 

&FLD = GetRecord(Record.X_VERIFY_WRK).GetField(Field.STRM);

&FLD.ClearDropDownList();



&SQL = CreateSQL("select distinct  a.strm , b.descr  from  PS_STDNT_enrl a, ps_term_tbl b where a.strm=b.strm  and a.emplid =:1", %EmployeeId);

While &SQL.Fetch(&strm, &descr)

   &FLD.AddDropDownItem(&strm, &descr);

   /* Adding each row from the SQL's output to the drop downĂ‚  */

End-While;

Build your where clause based on the Level 0 Work record fields

 &id = X_TSCRPT_WRK.EMPLID.Value;

&rqst_id = X_TSCRPT_WRK.REPORT_REQUEST_NBR.Value;

rem &sbdt = X_TSCRPT_WRK.SUBMITTED_DT.Value;

&nid = X_TSCRPT_WRK.NATIONAL_ID.Value;

&status = X_TSCRPT_WRK.X_DELIVERY_STATUS.Value;


&WHERE_CLAUSE = " ";

ScrollFlush(Record.X_TRANS_REQ_VW);

If All(&id) Then

   

   &WHERE_CLAUSE = &WHERE_CLAUSE | " EMPLID = '" | &id | "'";

End-If;

If All(&rqst_id) Then

   If All(&WHERE_CLAUSE) Then

      &WHERE_CLAUSE = &WHERE_CLAUSE | " AND " | "REPORT_REQUEST_NBR = '" | &rqst_id | "'";

   Else

      &WHERE_CLAUSE = &WHERE_CLAUSE | " REPORT_REQUEST_NBR = '" | &rqst_id | "'";

   End-If;

End-If;



If All(&nid) Then

   If All(&WHERE_CLAUSE) Then

      &WHERE_CLAUSE = &WHERE_CLAUSE | " AND " | "NATIONAL_ID = '" | &nid | "'";

   Else

      &WHERE_CLAUSE = &WHERE_CLAUSE | " NATIONAL_ID = '" | &nid | "'";

   End-If;

End-If;


If All(&status) Then

   If All(&WHERE_CLAUSE) Then

      &WHERE_CLAUSE = &WHERE_CLAUSE | " AND " | "X_DELIVERY_STATUS = '" | &status | "'";

   Else

      &WHERE_CLAUSE = &WHERE_CLAUSE | " X_DELIVERY_STATUS = '" | &status | "'";

   End-If;

End-If;




If All(X_TSCRPT_WRK.DATE_TO.Value, X_TSCRPT_WRK.DATE_FROM.Value) Then

   If All(&WHERE_CLAUSE) Then

      &WHERE_CLAUSE = &WHERE_CLAUSE | " AND " | "SUBMITTED_DT  between " | Quote(X_TSCRPT_WRK.DATE_FROM.Value) | " AND " | Quote(X_TSCRPT_WRK.DATE_TO.Value);

   Else

      &WHERE_CLAUSE = &WHERE_CLAUSE | "SUBMITTED_DT  between " | Quote(X_TSCRPT_WRK.DATE_FROM.Value) | " AND " | Quote(X_TSCRPT_WRK.DATE_TO.Value);

      

      

   End-If;

End-If;



If All(&WHERE_CLAUSE) Then

   &WHERE_CLAUSE = "WHERE " | &WHERE_CLAUSE;

End-If;

ScrollSelect(1, Record.X_TRANS_REQ_VW, Record.X_TRANS_REQ_VW, &WHERE_CLAUSE);


Generate BI Report from a page using People code

 import PSXP_RPTDEFNMANAGER:*;


&LanguageCd = "ENG";

&AsOfDate = %Date;

&OutFormat = "PDF";

&MyReportName = "ENRL_VERIFY";

&MyTemplate = "ENRL_VERIFY";


Local PSXP_RPTDEFNMANAGER:ReportDefn &oReportDefn = create PSXP_RPTDEFNMANAGER:ReportDefn(&MyReportName);


&oReportDefn.Get();

Local Record &rcdQryPrompts, &RC1;


&rcdQryPrompts = &oReportDefn.GetPSQueryPromptRecord();

If Not &rcdQryPrompts = Null Then

   

   &oReportDefn.SetPSQueryPromptRecord(&rcdQryPrompts);

   &rcdQryPrompts.EMPLID.Value = X_VERIFY_WRK.EMPLID.Value;

   &rcdQryPrompts.INSTITUTION.Value = X_VERIFY_WRK.INSTITUTION.Value;

   

   

   &rcdQryPrompts.ACAD_CAREER.Value = X_VERIFY_WRK.ACAD_CAREER.Value;

   

   &rcdQryPrompts.STRM.Value = X_VERIFY_WRK.STRM.Value;

   

   

   

   

End-If;



SQLExec("select TMPLDEFN_ID from PSXPRPTTMPL_VW where REPORT_DEFN_ID =:1 and LANGUAGE_CD =:2", &oReportDefn, &LanguageCd, &TemplateID);




&oReportDefn.ProcessReport(&TemplateID, &LanguageCd, &AsOfDate, &OutFormat);

CommitWork();

If All(X_VERIFY_WRK.STRM.Value) Then

   

   &oReportDefn.DisplayOutput();

Else

   Error MessageBox(0, "", 0, 0, "Please select a term from the list ");

End-If;