Monday 27 June 2022

Get PageList Exported to excel

 Get PageList Exported to excel


1. Create a Excel template as following format

    A1: Column Name : Case ID 
    A2: Property Reference as  : {ExcelPage.pxResults().CaseID}   // inside {}

2. upload it as a Binary file in excel format
         “excel” as the App name 
           File type extention as xlsx

3. Call pxGenerateExcelFile and keep primary page as the PageList which need to be exported
            define a file name "Exported.xlsx"
            define the template name as "excel!<FILENAME>!xlsx"

4. add the action set in the button as "open URL in Window" and define the activity name 

Monday 6 June 2022

Set Property value from Java Script

pega.u.d.setProperty("PageName.Property","Value");


<html>

<body>

function SetPropertyValue(){

var v1 = document.GetElementByID("PropertyName").Value;

pega.u.d.setProperty("PageName.PropertyName","v1");

<input id = "PropertyName" onchange="SetPropertyValue()"/>

<input id = "PropertyName" value= "Value1"/>

</body>

</html>


Sunday 29 May 2022

Daily Digest

 Remove Selected pages from PageList :

  1. loop through the page list (PageList name --> PGList),
  2. go to the page which need to be deleted and set pyDeletedObject == True,
  3. call the function --> @Utilities.RemoveDeletedObjects(PGList). (outside the pageList context)

Remove Duplicate from PageList:

  1. page list need to be referenced to Code-Pega-List (PGList.pxResults) ,duplicated property is ".Key" 
  2. call @pzRemoveDuplicatesFromListPage(PGList,".Key")

Get subscript from Current page in the pageList

param.pyForEachCount



Set Column type to nvarchar

ALTER TABLE {<DB>.<TableName>} ALTER COLUMN {<Column Name>} nvarchar(256) NULL;

Get PageList Exported to excel

  Get PageList Exported to excel 1. Create a Excel template as following format      A1: Column Name : Case ID       A2: Property Reference ...