Sunday 29 July 2018

How to Call Data Page from activity, How to copy one page list to another page list, How to remove Pages stored in clipboard using Activity

Now we will see 
  1. How to Call Data Page from activity?
  2. How to copy one page list to another page list in activity?
  3. How to remove Pages stored in clipboard using Activity?

First of all I have an data page I configured Report definition in that data page, when my data page runs It will retrieve all the data stored in my table 


Now Below image shows the retrieved data while running the Data Page.


Now our requirement is to run this same datapage in activity ,lets see how to do that.

In activity, there is an method "Load-DataPage" to run data page in activity here in parameter we have to give Pool ID- a unique value(in my activity i gave ABC),  and in Data Page we have to give the datapage what we wants to call.


Now we will see Whether its works or Not?

In the above Picture u can see all the data it retrieved.


Next we will see how to copy this retrieved data in clipboard to our own pagelist property 

In Pega , there is an method Page-Copy, we can use this method to copy pages. In CopyFrom we have to give the Page from which we have to copy and in CopyInto we have to give the target page.



In our scenario the Source page is the page list in clipboard to page list that I created(.Values)


I gave Source Page name as D_HRPlanList  and in Target Page I gave my PageList that I created .Values

I gave Append in .Values , This is because I am appending all the data available in Source Page to Target Page.


Now on Run the Record We can see the Result.


Now Next we have to Remove all the pages in Clipboard, if we don't need all the data in pages means we can remove those unwanted page from clipboard.

Now I use Page-Remove method to remove page "D_HRPlanList" from clipboard


Now Check Whether the Page still there in Clipboard or not.


Now U can see the page is removed from the clipboard.

Monday 23 July 2018

Adding Attachment in Pega

Adding Attachment in Pega

In Some cases we need to use attachment in application, if we are creating application for Employee Recruitment process then candidate have to upload the resume. In such scenarios Attachment is used.

Lets try this scenario.

First of all we have to create one Attachment Category rule, Attachment category is in Process->Attachment Category
In Attachment Category we have to give the access, whether the Application user can edit , Create, Delete, etc
Now in the above image I gave access to create and edit and I Not giving access to delete attachments.

Then we have to configure Section.

In Section I added a button to add attachment, On click we add an action "Local Action" there we have to give Local Action as AddAttachments and Target as Overlay and Overlay Format as Standard.

Now we will see how its works,

On Clicking the Add Attachment.
There we have to select the Category and File to upload
After Click Submit we can see the attached document with the case.


All the attached files will be saved in Work-Attachment  class

Thats all Adding attachment to case through flow.

Thursday 19 July 2018

How to Use Duplicate Search in Pega

How to Use Duplicate Search in Pega



Duplicate Search :  If already same set of data is there in database, we no need to get the same details again and storing the same data again to database.. So we use Duplicate Search to check whether the same data is there in database or Not.

First of all I created 3 Properties in Case Type.

After Creating these Properties in Settings Tab, I clicked Track Duplicates



After Clicking that, a panel will open on left side

There we have to add the condition like
  • Primary.FirstName = .FirstName
  • Primary.LastName=.LastName
  • Primary.Age=.Age
If any age in previous case match with our entered age , FirstName in previous case match with our entered FirstName, LastName in previous case match with our entered LatName then it is a duplicate data .

I gave Primary because primary means current .... Like,  Current Case.FirstName = FirstName

Then For every Condition we have to give weight something between 1 to 100. Now for First Condition I gave weight to 25.

In the above Picture I gave weight 25 for every condition . So if FirstName match means weight will be 25 , if LastName also match means weight will be added to become 50 if age also matched with existing age means weight becomes 75.

In Case is duplicate when sum  , I gave 50 , if total weight reach 50 means case will be set as duplicate .
Then we have to enable ConfigureMust match condition check box, after checked this check box a +add condition link will come there we have to add condition like,

Then click Save..



After done this we have to configure the UI.

I created Two stage, In first stage we collect information like FirstName, LastName, Age.

In Second Stage, we showing the details we got in first stage.

After Adding this we have to add one utility , to show the duplicate cases.

After adding this utility , we have to add the Note, it should explain what we are doing.

Thats all , Now we have to test our work.

For this case I gave FirstName=Rahul , LastName=K , Age=22  then i click Submit.
After Clicking Submit next assignment came..

Now I have to give same data again to test our Work.
Now i gave same value and Click Submit.
Now U can see case S-6 matched.  S-6 also have same data  and weight is 75, because all the 3 data matched so 25+25+25=75.

U can Continue the case or u can Resolve the case by clicking the buttons.

Thats all Duplicate Case Search.. If any doubt ask in comment.

Thursday 5 July 2018

Field Value In Pega

 When to use Field Value

What are all the places we can use Field Value

    1. If we want to add Local Values(Means in State DropDown we have to give multiple State Names).
    2. For Adding New Status(basically we use pega status only, if we want we can create our own Status and we can use that too.)
    3. We can add Dynamic Lable Value using Field Values.


Using Field Value, How to add Local Values???

Normally How we add Local Values ?  If we want to add an property Gender to a section we will Drag and Drop a Radio Button, and we will give an Property Name for that Radio Button and We will add the Gender Male Female in Local List.







Now we will try how to use Field Value, Our requirement is we have to list all the Country using DropDown .

First I Drag and Drop one DropBown from Basic

In the Below image I added one property Country

 On the property rule, I select Field Value(Not Local List)
 It will asks for Field Class Name and Field Name. So I create One Field Value from Create->Data Modal->Field Value
 In Label Field we have to give the country we want to display and in Field Name we have to give The property (.Country)
 Now I created field value(India ) in Field Name Country
 Then I created another one field value(China) under Field Name(Country)
 I gave for sample 5 Country then after creating Field Value we have to refer that in our property rule, open Country property rule , there in Field Name we have to give Country(Without Dot ) and Field Value Class Name We  created(TGB-HRApps-Work)
 Then on run below output will come,



How to Create New Status in Pega using Field Values???



Now I am creating pyStatusWork property in TGB-HRApps-Work .
 This is the Case Type where we are going to set the Status
 Now I am creating the Field Value for Status GettingDetails
 After Click Create and Open the window look like this.
 and I created another one Field Value for Status InPaymentDetails.
 Here u can see i am in assignment Enter ExpenseDetails , and I am adding the status for that assignment as GettingDetails, after we add there the status it will display here
 In Payment Assignment I added the status InPaymentDetails, that we created it listed here.
 Now after I run the Flow, Control is in First Assignment, eventhough I not added any Section we can see the Status Below. "GettingDetails"

This is the way of adding status by Field Value, If have any doubt means ask in Comment Box.




Adding Dynamic Values in Label Using Field Value 



Now I Drag and Drop one label, by default it will be Sample Text, remove that and Give any Name and Click that ribbon button, then it will open a Field Value Rule.

 Now on creation of field Value, I gave Field Name as pyCaption and Label as ShowCaseInformationLabel.
 In the below image I gave parameter value as 1 and 2, this place will be removed by dynamic property value on run time.
 Here I pass the String "ParameterOne" for parameter 1 and "ParameterTwo" for parameter 2

After I run the Flow Result will be like.

Now in above picture u can see the parameter is passed successfully.

If U have any doubt ask in Comment :)